Varnish

The box has Varnish Cache running on port 8080 for development purposes. By default, Varnish will not cache anything and pass through all requests to Apache on port 80. If you enable Varnish, the default rules will cache all front-end pages, even including cookies. You will need to edit the default VCL file if you need specific rules for your application. Edit the file at /etc/varnish/default.vcl using your favorite editor, for example:

sudo nano /etc/varnish/default.vcl

You can also edit this file directly through your browser using the file browser. Right click on the default.vcl file and choose Edit. Press cmd⌘+s to save your changes.

When you are done, restart Varnish to apply your changes by executing the box server:restart varnish command.

You can control Varnish Cache using the following commands:

varnish:clear

Clear the cache

Syntax

box varnish:clear

varnish:disable

Disable Varnish cache

Syntax

box varnish:disable

varnish:enable

Enable Varnish cache

Syntax

box varnish:enable