0

We are using this extension for varnish cache

But we are facing a issue with sign in/logout link and compare product count in top links.

when we logout account and navigate to homepage it still shows sign out button but actually it is logged out.

same with compare product count, When we add product to compare.It adds the products in compare list but neither update the quantity on top links nor showing any message .

I have tried with ESI, AJAX, dummy, ttl =>0 method to bypass the header links but not working.

Can anyone help me to solve this issue?

1 Answer 1

0

Have you first verified that Turpentine and Varnish are configured correctly? We have a guide here with ways to be sure everything is configured correctly.

If so, then the next step is to make sure that the blocks containing those links are set to be hole-punched via ESI, using the "private" setting. This will ensure that copies of those blocks are cached per-user. You may also need to add flush events to make sure that the cached blocks are flushed on the appropriate events. You can do this via your layout.xml - more info here.

Feel free to open an issue on github and we'll help out as much as we're able.

4
  • yes varnish and turpentine is properly configured but compare prodcut count not updating when I add product in compare. I am using following code to bypass header links "Compare products'. <reference name="products_compare"> <action method="setEsiOptions"> <params> <access>private</access> <method>esi</method> </params> </action> </reference> Commented Jun 3, 2016 at 11:20
  • In the HTML output, do you see the Turpentine-generated html comments before and after the products_compare block? If so, the ESI is working. If not, is the products_compare block inside of another block that is being hole-punched with ESI? Commented Jun 3, 2016 at 12:30
  • I didn't see any comment for turpentine in HTML except a turpentine ajax request which is for top link mini cart. Commented Jun 6, 2016 at 5:20
  • OK, then it sounds like the ESI hole-punching is not working for that block for some reason. Try turning on the debug options in Turpentine then clear all the caches and look in the system log for mentions of that block. Commented Jun 6, 2016 at 12:01

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.