Information for: DEVELOPERS   PARTNERS   SUPPORT

Varnish caching

Varnish is a caching tool that can greatly increase website performance. If you’re new to Varnish, learn more about it from Adam Malone’s Varnish for Beginners blog post.

Varnish operates by storing anonymous user connections and then serving them from memory, instead of making requests to the web server. For this reason, Cloud Platform uses Varnish in front of its load balancers. For information about how to enable your Cloud Platform website to use Varnish, see Using Varnish.

For Drupal 7, ensure that your site isn’t setting a SESS (session) cookie, which will invalidate Varnish caching on Cloud Platform. The Varnish module is not compatible with Cloud Platform.

By default, all static files are cached for two weeks as part of the standard Drupal installation. In the standard Drupal .htaccess file you will find this:

# Requires mod_expires to be enabled.
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600

By default, Cloud Platform Varnish does not cache the following:

  • SESSION cookies
  • HEAD or POST requests
  • Responses over 10 MB

Cloud Platform Varnish enforces a minimum caching policy of 15 minutes on HTTP 404 and 301 responses unless the backend provides for a higher value. If this is an undesirable behavior, contact Acquia support.

Additional caching information

For more information about caching on your Drupal website, see Caching overview.

You may also find these documents useful:

More Information