Caching of your site tends to create a superior user experience as pages are served to your site visitors more quickly. In the modern technological world of “NOW!”, where we expect our requests from technology to delivery immediately, anything that takes longer than a few seconds to deliver what the user asked for is considered slow, useless, or obsolete.
Caching of live WordPress sites is something that used to be a rare occurence. With more informative articles, better hosting companies, and the user community “leveling up” their technical expertise, caching of WordPress sites has become more commonplace than ever before. That is a good thing.
Many other web presence services and hosting companies have deployed caching for years. Some are more advanced than others with their deployment process. The better web presence platforms will manage flushing the cache for you.
Security or Proxy Service Caches
The general rule of thumb we go by is any time we do a major software update, clear the Proxy Service Cache.
System Code Caches
Speeding up the execution of code can be done with various server-side technologies. For our WordPress deployments we often deploy OPcache. All of our hosted PHP code uses this service to “remember” the code for the most-accessed PHP files and store it in fast access memory (RAM on most servers). This eliminates a lot of file open/close requests which is still one of the slowest processes a hosted application performs even on solid state drives. PHP code execution is much faster withOPcache in place.
This also means that updating ANY PHP code on the system requires anOPcache flush. Doing this is easy but, like the proxy service cache, remembering to clear this cache is something that must be added to standard production system update processes.
We recently updated the Experience component along with a base upgrade of Store Locator Plus. The sites broke with a fatal error that took down the site because a specific function required by the older Experience code was missing. The problem was the opCache had the old code forExperience, not the newer code that referenced the replacement function instead. Clearing theOPcache brought evertyhing online immediately.
Web Browser Caches
Web browsers all come with some level of caching enabled by default. Some browsers, like Safari, are hyper-aggressive with caching. The browsers are also doing a lot more performance tricks to “beat the competition” by pre-fetching pages based on search histories before you even GO to the page. This can throw off proxy service caches and opcache requests as your web content may have loaded in some browsers, Safari seems to be the most egregious in this regard, BEFORE you cleared those caches and stored the page locally with the broken pre-flush version.
Caching Is Not Always The Problem
While caching is not always the problem when a web experience goes wrong, we find more-and-more often that our customers “forget to clear the cache” after doing a software update of Store Locator Plus. Our MySLP users have far less issues in this regard as we ensure that several levels of caching are cleared every time we update the production software; they can, however, still encounter issues with browser caching or the content that contains the location maps if they have not cleared their Bootstrap server-side caches for example.