Usage

Aric Watson edited this page Mar 21, 2016 · 5 revisions

Turpentine is fairly well integrated into Magento's default UI now. Saving changes to products, categories or CMS pages will automatically flush the corresponding pages in Varnish. The cache can manually be flushed by going to the System > Cache Management page in the Magento admin and flushing the Varnish Pages cache (or the Varnish ESI Blocks cache for just the ESI blocks).

Note that you may get an error when enabling the Varnish Pages and/or Varnish ESI Blocks cache types the first time after installing. If so, just refresh the Cache Management page and try again, it should not come up again.

The Flush Magento Cache and Flush Cache Storage buttons will also do full Varnish cache flushes, and the Flush Catalog Images Cache and Flush JavaScript/CSS Cache buttons will do corresponding flushes for Varnish.

Saving changes to the Varnish Options or Caching Options will immediately apply the new Varnish configuration and save the new VCL so manually doing this should no longer be necessary (but the buttons are still available if needed). The Varnish configuration (VCL) can still be downloaded for inspection by using the Download Varnish Config button on the Cache Management page.

Varnish caching for Magento can be disabled by disabling the Varnish Pages cache type on the Cache Management page. ESI blocks can also be disabled this way but doing so is only recommended for debug/development purposes and will otherwise break the site (as ESI processing will be disabled in Varnish).

The Activate Varnish Bypass button will set a cookie in the browser that will bypass Varnish. This can be helpful when debugging ESI policies. Flush Matching Urls allows the flushing of the Varnish cache for all URLs that match the regular expression pattern entered. For best results, only enter a portion of the URL - without the leading slash.

Blocks can be specified to be ESI included using an ESI cache policy. Turpentine comes with ESI cache policies that should cover a basic Magento install. Please see the ESI cache policy wiki page (linked above) to define additional blocks to ESI include.