You must configure your Drupal application to take advantage of Varnish®. To set your website’s cache options to external caching, open your Drupal application’s Performance page. The cache settings depend on your version of Drupal:
Note for Site Factory users
Changing Site Factory caching settings requires you to create a post-settings.php hook.
On the Performance page at /admin/config/development/performance
, select
an option from the Page cache maximum age list. This value sets the
maximum time a page can stay in the Varnish cache. Selecting
<no caching> sets the max-age
value to 0, which means assets are
never cached. A reasonable value is 6 hours to 12 hours.
To configure Drupal 9 or later to use BigPipe rendering, see Enabling BigPipe rendering on Cloud Platform.
On the Performance page at Configuration > Performance, set values for the following items:
max-age
header Drupal sends to Varnish is 0, which means
the page will not be cached. A reasonable expiration setting is from
6 hours to 12 hours.Important
For Drupal 7 and earlier versions, Acquia strongly recommends you do not compress cached pages, as compression can cause problems with both Varnish caching and New Relic application monitoring.