Not caching certain plone templates in Varnish

written on 2010-05-26

For a customer I needed to have an old school custom Plone template not to be cashed. The site was put behind varnish and just adding "no-cache" headers did not work.

The solution was creating an extra rule in the "Cache Configuration Tool" (\\\_cache\\\_settings/with-caching-proxy/rules), which allows for quite a lot of customization.

To the top of the existing rule set, add a copy of the plone-templates. In the rule under "Templates" add your template id and for the "Header Set for ..." set both dropdowns to "Do not cache". This should do the trick, at least it did for me.