Nothing is more frustrating to site visitors than a slow site. Millions of users leave pages long before they load. In an effort to make sure the thousands of sites on Web.unc run well the WebdotUNC team continually tweaks and adjust the caching settings to find just the right combination. This article is designed to give you an overview of what we are doing, and how you can work with the caching tools.
There are two types of caching: browser and server based. We have both installed on WebdotUNC sites. In addition to that there are four servers that balance the traffic across a load balancer to easily handle hundreds of thousands of visitors a day.
Bat/Memcache is the browser caching tool we are using. It creates a local .html copy of all .php pages that are normally served out by wordpress. This reduces the traffic to the servers, and creates a lightning fast copy that visitors see when visiting the site. The fourth time a page is visited a copy is created of the cache. This copy expires every 5 minutes and a new copy is created when the next four page views occurs, or when ever you click the update/publish button on posts, or menu items.
Alternative PHP Cache (APC) is the server package we have installed to help generate the php code that runs wordpress.
How To Get Your Site to Update
If you are having problems with your site updating most likely it has to do with the sidebars, or dynamic content. These do not trigger the update for clearing the cache that normal page views do. That means if you have a page that is set by a theme setting, or you change some info in a sidebar just go in and update a post (any post will do). After you do this the next anonymous visitor that comes to your site will generate a new .html cached copy of the page (you will see it right away as well).
There are some sites on the sites.unc.edu network that require 5 minutes to see any changes no matter what those changes are. You are already probably aware of the requirement if you edit one of those pages. The unc.edu main site is one of those.