magento-turpentine icon indicating copy to clipboard operation
magento-turpentine copied to clipboard

Complete clear cache

Open atomixstar opened this issue 7 years ago • 2 comments

Hello, nice extension. I use this with Magento 1.9 - apache2 - varnish 3 on AWS EC2.

On first install was some errors, I fixed them and now I want to complete clear cache for all pages in my domain. I tried everything but not working, Clear cache via Magento admin, clear via ssh nothing, the cache still active. Header cart not updating after add to cart with ajax extension but I found some solutions here about that. I added to turpentine_esi.xml restarted varnish via ssh but still not nothing, cache is not clearing, on some page cart header appears 4 items on other appear 1-2 etc.

Also, is there any option to disable temporary cache on varnish during development?

EDIT:

I found that now works by deleting from Magento Cache, now I have an issue with cart header, I just placed an ESI Cache Policy for that. It works only if I have opened the "Inspect Element" on Chrome, If I close Inspect Element then pages loads instantly but header cart not updated.

      <reference name="cart_header">
         <action method="setEsiOptions">
      <params>
        <method>esi</method>
            <access>private</access>
            <scope>page</scope>
            <ttl>0</ttl>

         <registry_keys>
        <current_product/>
         <current_category/>
                    <current_entity_key/>
        </registry_keys>
            <flush_events>
                    <sales_quote_save_after/>
                </flush_events>
             </params>
           </action>
       </reference>

Thank you

atomixstar avatar Mar 18 '17 18:03 atomixstar

yes, you can bypass by adding a cookie. sorry I forgot that cookie name will update you once I get.

<reference name="minicart_head">
            <action method="setEsiOptions">
                <params>
                    <access>private</access>
                    <ttl>0</ttl>
                </params>
            </action>
        </reference>

Its working fine for me

shine-eglobeits avatar Mar 20 '17 06:03 shine-eglobeits

Here is the Wiki section explaining how to use the Activate Varnish Bypass feature. Also, the issue you are experiencing is not related to Varnish but to an incompatible theme architecture. When you see different items in your cart, you are basically seeing others people carts because the block is being cached publicly instead of private. i suggest you to check the rest of the Wiki where you can find examples of how to set up an ESI policy.

miguelbalparda avatar Mar 20 '17 15:03 miguelbalparda