Drupal - Cached Content

Drupal websites have three levels of caching to improve performance (the time it takes to download and render a page).

  • The user’s web browser will cache pages so the next time the user wants to view the same page, it can be quickly retrieved from the browser cache, instead of downloaded from the web server.
  • Varnish, a caching system in between Drupal and the network, will cache pages for some set amount of time, usually 6-12 hours. If a requested page is in Varnish, that is the version of the page delivered to the browser.
  • The Drupal application will cache pages for a set amount of time, usually 6-12 hours. Each time a visitor views a page, this setting tells Varnish and the browser how long it should keep the page before checking for a new version.  Note: Do not change this setting. Changing this setting will negatively impact the site's performance.

Varnish and Acquia Purge

Acquia Cloud, our Drupal hosting platform, uses a module called Acquia Purge to watch for certain changes, like when a node is changed and published, and adds those nodes to a queue for clearing from Varnish.  The purging process runs hourly. However, cache rules can be somewhat complex, and other settings may prevent a specific item from being purged from Varnish when expected.

Caching Issues

Sometimes, when you edit and publish content, then go look at the page, you won’t immediately see the change you made. This is usually because the content is cached. Don't panic, caching is a good thing for your site's performance.

Please note, urgent issues are defined as those that convey critical information to the campus community such as emergency notifications or significant system or building outages. Due to the workload demands, we ask that non-urgent issues observe the 6-12 hour cache purging processes.   

However, if you can't wait for the change to take effect for all site visitors, here are some things to try.

First, try this:

  1. Clear your browser cache and reload.
  2. Try a different browser (Chrome, Firefox, Safari, Edge, etc.).
  3. Clear the Drupal cache, then clear your browser cache and reload.

If that does not resolve the problem, determine which protocol is not getting the current content.

  • Non-SSL - Visit the page using http
  • Anonymous SSL - Visit the page using https, but not logged into Drupal
  • Authenticated SSL - Visit the page using https, while logged into Drupal

If the problem is only on Non-SSL, and the issue is urgent:

  1. Login to the Drupal site.
  2. Navigate to Manage > Configuration > Performance > Manual Purge.
  3. In the Paths to be purged field, enter the path of the page you want to purge. If it is the front page of the site, use <front> for the path.
  4. Click Refresh.
  5. Wait up to 1 hour for the process to run.

If the problem is only on Anonymous SSL, and the issue is urgent:

  1. Currently, Content Leads can not clear the Varnish cache for Anonymous SSL. Wait for the hourly process to run, then clear your browser cache and reload the page.
  2. If the current version of the page is still not displayed, report the incident to the Web Office.

How to report a Website Caching Issue to the Web Office

  1. Click the Get IT Help button at the bottom of the navigation section of the IT website, or go to https://help.sonoma.edu/support/login and click Report an issue.
  2. In the ticket, include:
    • "Drupal Website Cache Issue" as the subject
    • the URL of the page with the issue
    • a portion or example of the content on the page that is changed but not displayed (so we can verify where the problem is and when it is fixed)
    • the reason why the page must be cleared on an urgent basis, instead of waiting for Drupal and Varnish to clear automatically.

Allow 4 hours for a response to urgent issues during normal business hours. For all other issues, allow 24-48 hours for a response.

General Advice When Sharing URLs

  • For most cases, when sharing a URL for your website or specific pages, use the non-SSL URL.  This is the URL that starts with http://.  Usually, this is the URL that will be easiest for you to clear the cache for.
  • Before sharing the URL, wait an hour after saving the change for the page to be automatically cleared from Varnish.