We have installed Varnish v4 on our server to improve the Magento response time (we have installed the Turpentine extension as well to manage varnish). I am currently working on excluding cache for certain blocks however nothing is working for me.

In the before_body_end, I have this code:

    <reference name="before_body_end">
                <block type="core/template" name="compare.products" 
                        template="page/html/compare-products.phtml" /> 

I have modified the turpentine_esi.xml and added the following code which to me seems correct however the block is still being cached:

         <reference name="compare.products" type="core/template">           
             <action method="setEsiOptions">

Is someone able to point me in the right direction? I am currently at a loss to why this code is not working.

1 Answer 1


With those ESI policies you're setting the block to be cached privately via ESI. In other words, each user will have their own version of the block cached in Varnish. That may actually be what you want.

You can verify this is working by looking at the source code of the page - you should see some HTML comments before and after the compare.products block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.