I work with an advertising network and have been having some problems with ad fulfillment. Today their admin said I needed to be “clearing the cache” after each change was made. How do I clear the cache on my WordPress blog?
The best place to start this answer is with a definition of what a cache is. To do that you need to realize that while it may seem that the Web is all about your browser being sent pages and images directly from another Web server, it really is far more complicated than that. The underlying protocol is a mix of send-me/here-is and send-me/can’t-find, but since the Web is global, it turns out to be quite inefficient for every request in Cape Town, South Africa for your Web page to be sent all the way through the wires to your server in Seattle, Washington, just to have your computer send back the same page or image it’s been serving up for hours, days, even weeks.
The result is a cache. A cache is a copy of content that’s stored somewhere on the path between requestor and server so that if there’s a match, it can be sent without the rest of the round-trip being necessary. So Cape Town, South Africa’s network might connect with Cairo, Egypt, then to Rome, Italy, London, England, across the Atlantic to New York, USA, then across the country to Seattle. If Cairo has a local copy of your pages and images, that’s going to be much, much faster than having the requests bounce through all those intermediate hops.
Of course, you need to ensure that if your site changes, the intermediate caching servers (known collectively as a Content Delivery Network) update their saved copies to reflect the update. That can often be problematic so it’s common for sites to be hours out of date when things change. The variable in question is known as “time to live” (TTL) and it’s one of the settings in WordPress: A common setting is one hour for things that change a lot – like the site home page – and 24 hours for content that’s a bit more dusty, like your About page.
With me so far? Because now it turns out that WordPress itself has a cache too, because otherwise, every single request would result in all the underlying code that powers your blog being invoked, which is, you guessed it, inefficient. So WordPress generally has cached versions of pages so that if one person asks for it, they get the created page from the database, but the second person gets the saved version. All good and smartly efficient if your pages don’t change.
If you update the contents of a page or post on your WordPress blog, however, you now have a challenge: Your site might still be serving up the version of the page that was current 15 minutes ago, and that might then be also stuck in the content delivery networks and their global caching system. Sometimes you just need some patience because it all does get resolved over a few hours in almost all cases.
Except when you’re making changes and asking someone to check them. They get the older version, you don’t understand it, and you both get frustrated. Hence the request to “clear your cache”.
And here’s the rub; you can only clear the cache of a page if you’re the admin of the site, and it’s different on each host because they configure their sites differently. For example, on my IntuitiveStories.com blog, when I’m viewing a page and am also logged in to the WordPress backend, I see a handy toolbar along the top of the page:
Nothing there that says “Cache” or “Clear Cache”, right? But the site is hosted at SiteDistrict, and it turns out that clicking on that reveals a menu that includes the needed option:
Your hosting company should have something quite similar. if you don’t see it, check with your hosting administrator to find out how you can clear the cache. Would it be convenient if it were consistent? Yes. But…
Pro Tip: I’ve been running and writing about WordPress for many years. Please check out my extensive WordPress help area here on the site for more tutorials and guides while you’re visiting!