Sample Varnish Cache Snippets

Varnish Cache Configuration

Advanced configuration is done via the Varnish Cache Control Language file default.vcl. You can access this file by going to Repository under the Configuration menu in the left nav of Aperture and then clicking on the Varnish Cache file.

To help you get started, we’ve written some VCL snippets that cover some basic aspects of functionality for you to review.

Cache Static Content

Normalise Accept-Encoding

Enforce HTTPS

Block Access

Cache Everything

Wordpress Caching

For more information on how to write VCL, visit Varnish documentation, where each version has its own user guide. Here is documentation for version 4.0