Cache is a way for computers to speedup content delivery. The content is saved in “memory” so the next time it’s delivered to a visitor’s device it loads quickly.
Unfortunately, if the content is changed between when it’s put in the cache and the next time it’s loaded the changes will not appear. The trick is to balance the performance gain of caching against timely content delivered.
If you ever make a change and don’t see it, the cache may need to be “cleared.” After reading the below descriptions, if you suspect caches aren’t clearing as expected or if you really need it cleared immediately, please let the Web team know. We can force the cache to clear.
On this page:
Types of Cache
A visitor to a webpage may experience a cached version generated from any three of the following cache mechanisms:
- Drupal
- Server
- Browser
Drupal Cache
On a live Drupal site, caching is turned on for anonymous visitors but when a person logs in caching is turned off. The site will load much more slowly which is a hassle for content editor but edits should be immediately viewable.
Drupal also implements caching for aggregated lists of content, called “Views”. These are collections of content that meet specific requirements such as ‘all news articles,’ ‘the list of all staff pages’ or ‘the set of feature items on a homepage.’
So that anonymous visitors can see the latest edits, the COFA Web team has tried to implement triggers that strategically clear cached content. For example, when page content is added, updated or deleted, its page cache will be removed from the Drupal cache. Configuring this takes some fine-tuning, so let us know if your content is not available right away to the public. NOTE: These cache-clearing triggers only affect the Drupal cache, not the server cache discussed next.
We recommend that you check that your changes are displaying in a different browser that you are not logged into.
All Drupal cache is cleared once daily for all sites, in the middle of the night.
Server Cache
The university server caches content, as well. It is set to clear every two hours. There’s no way to know when the two hour increment started or will end.
Browser Cache
To make things more complicated browsers generally do some caching also. Sometimes browsers display pages that are in its memory which may be out of date. Some browsers cache things for a very long time, especially if you do not shutdown your browser.
Review the Preferences of your browser to see if caching is set and do a Google search to learn how to clear the cache of your browser of choice.
Be aware that some of the data stored in your browser, which you count on, may be cleared. For example, if you’re logged into a site it will log you out. You may choose to have a dedicated browser for working on Web editing.
Workaround
Visit the page in a browser that you are not logged into and add the following string to the end of the URL path:
?nocache=1
If you see the newly edited content then it is either in the browser cache or the server cache.
If you do not see the new content, double check that it is published by logging back in and adding the same sting to the end of the URL path:
?nocache=1
If you see the newly edited content, then it is in the Drupal Cache.
Learn More
Caching Tutorial for Web Authors and Webmasters by Mark Nottingham.