Information for: DEVELOPERS   PARTNERS

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, Acquia Cloud uses Varnish in front of its load balancers. For information about how to enable your Acquia Cloud website to use Varnish, see Using Varnish.

You can also use Varnish over SSL, which can help protect your website. See Best practices for a fully SSL-protected site for information.

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

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

Acquia Cloud Varnish does not, by default, cache SESSION cookies, HEAD or POST requests, objects over 10 MB, and some edge cases. Acquia Cloud Varnish also will not cache HTTP status codes above a 301; see Caching redirects in Varnish.

Additional caching information

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

You may also find these Help Center documents useful:

More Information