<div dir="ltr">No one knows then ? Not even a hint or something ?<img width="0" height="0" class="mailtrack-img" src="https://mailtrack.io/trace/mail/cb6783af44ef37d67944a6ee118a0166d6fd51f0.png"></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-23 13:15 GMT+01:00 Xavier Cardil Coll <span dir="ltr"><<a href="mailto:info@elsitar.com" target="_blank">info@elsitar.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Also, how to write a function to bypass cache entirely when a user logs in ? <img width="0" height="0" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">2015-12-23 12:39 GMT+01:00 Xavier Cardil Coll <span dir="ltr"><<a href="mailto:info@elsitar.com" target="_blank">info@elsitar.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p style="margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:14px;line-height:22.4px;margin-top:0px!important">On Nginx cache, you can do this to avoid keep on caching when you add something to the cart in Woocommerce :</p><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:14px;line-height:22.4px">Skip cache for WooCommerce query string</p><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:11.9px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;word-wrap:normal;color:rgb(51,51,51);background-color:rgb(247,247,247)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:11.9px;padding:0px;margin:0px;border-radius:3px;border:0px;display:inline;max-width:initial;overflow:initial;line-height:inherit;word-wrap:normal;background:transparent">if ( $arg_add-to-cart != "" ) { 
      set $skip_cache 1;
}
</code></pre><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:14px;line-height:22.4px">Skip cache when WooCommerce cart is not empty</p><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:11.9px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;word-wrap:normal;color:rgb(51,51,51);background-color:rgb(247,247,247)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:11.9px;padding:0px;margin:0px;border-radius:3px;border:0px;display:inline;max-width:initial;overflow:initial;line-height:inherit;word-wrap:normal;background:transparent">if ( $cookie_woocommerce_items_in_cart != "0" ) {   
    set $skip_cache 1;
}
</code></pre><p style="margin-top:0px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:14px;line-height:22.4px;margin-bottom:0px!important">How can you do this in Varnish ? With this config, wich was made specifically for Wordpress + Woocommerce, when you add something to cart, cache is not disable store wide so you get a mix of cached and non cache pages, cart gets emptied : <a href="http://pastebin.com/TuYeMtUZ" style="color:rgb(64,120,192);text-decoration:none;background-color:transparent" target="_blank">http://pastebin.com/TuYeMtUZ</a></p><span><font color="#888888"><div><br></div>-- <br><div><div dir="ltr"><div><div><br></div><div><font color="#ffffff">ELSITAR</font></div><div></div><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><img src="https://docs.google.com/uc?export=download&id=0B3XfePYC7r00QkVpTzFuYWx4NUU&revid=0B3XfePYC7r00amZwVHAxMGVxeUNhUFNzSGhlRUhadFBjbjlRPQ" width="200" height="87"><br></div></div></div></div></div>
<img width="0" height="0"></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div><div dir="ltr"><div><div><br></div><div><font color="#ffffff">ELSITAR</font></div><div></div><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><img src="https://docs.google.com/uc?export=download&id=0B3XfePYC7r00QkVpTzFuYWx4NUU&revid=0B3XfePYC7r00amZwVHAxMGVxeUNhUFNzSGhlRUhadFBjbjlRPQ" width="200" height="87"><br></div></div></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div><br></div><div><font color="#ffffff">ELSITAR</font></div><div></div><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><img src="https://docs.google.com/uc?export=download&id=0B3XfePYC7r00QkVpTzFuYWx4NUU&revid=0B3XfePYC7r00amZwVHAxMGVxeUNhUFNzSGhlRUhadFBjbjlRPQ" width="200" height="87"><br></div></div></div></div></div>
</div>