Fun with Web Cache

If you’ve been using WordPress for any length of time within Student Affairs, you may have noticed that when you sign into your WordPress site there is an option at the top of your page that didn’t always use to be there, “Purge Current Page”:

Purge this page

Caching is a strategy that servers/browsers use to increase performance of web pages/sites.  Here’s a good link to learn more about caching if you care to.

Normally when making edits to your site the cache should be automatically cleared when you hit ‘Update’.  However, occasionally the cache could become inconsistent with the current version of the page, and this usually becomes evident when you (or a visitor to your site) open up a browser in which you are NOT logged in and you see something is incongruent with your current version. By the way, it’s highly advised that you have two browsers open at all times when editing your site – one in which you are signed in as an admin, and one in which you are viewing the page as the general public would.

While caching is a web technology that’s been around for decades, Web Communications (who hosts all of our WordPress sites) leverages caching via a technology called Varnish which is more sophisticated and unfortunately occasionally more burdensome (for admins at least) than strategies we’ve used in the past.

Most frequently caching issues tend to occur on pages with forms, but it’s possible they may occur on any page of your site.  When they do occur, you have a few options:

  1. After first signing as an administrator, visit the offending page and click “Purge Current Page” to clear the server-side cache for that page alone.  Next reload the page in the browser where you are NOT logged in to see if the content is properly refreshed.
  2. If you are still seeing issues/outdated content, also be sure that your client-side cache isn’t the issue by pressing Ctrl + F5 (PC) or Control+Shift+R (Mac) to do a hard refresh of your page.  Alternatively, you may instead open up a new private browsing/incognito window and load the url.
  3. If the incongruence still persists, next visit your Admin dashboard (https://YOURSITE.colostate.edu/wp-admin/index.php) and click “Purge Cache” at the top of the page.  This purges the cache for the entire site, not just a single page.
  4. Finally failing all this, please contact your resident web developer for assistance 🙂

NOTE: Unfortunately with the introduction of Varnish into our hosting environment (which we don’t directly control – the Division of IT does), we’ve seen the need to take some/all of the above interventions become more frequent. 

If you find needing to take the above steps repeatedly for the same page, we may be able to alleviate certain issues by disabling Autoptimize for the page in question.  We do so by simply clicking “Edit Page” and then unticking “Optimize this page?” within the Autoptimize box.