<div dir="ltr">Thank you, that did the trick :-).<br><div class="gmail_extra"><br><div class="gmail_quote">2015-12-05 14:22 GMT+00:00 Guillaume Quintard <span dir="ltr"><<a href="mailto:guillaume@varnish-software.com" target="_blank">guillaume@varnish-software.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><p dir="ltr"><br>
On Dec 5, 2015 15:07, "Paulo Silva" <<a href="mailto:paulojjs@gmail.com" target="_blank">paulojjs@gmail.com</a>> wrote:<br>
> Since the purge requests will only have the hostname and url, is purge smart enough to remove from cache both versions or will it remove only the object without the cookie? If only one version is removed is there some way to force varnish to remove both versions (without issuing a second PURGE request with the cookie)?</p>
</span><p dir="ltr">Purge is not smart :-) it will purge a whole Objhead, ie. all objects with the same hash.</p>
<p dir="ltr">Unfortunately, what you are doing stores the objects under different hashes.</p>
<p dir="ltr">What you need here is the vary-header. I won't go into details now (you should have plenty of info in the varnish book), but basically, you can set req.http.mycookie = "yes" or "no" and beresp.http.vary = "mycookie" and varnish will do what you expect.<br>
</p>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Paulo Silva <<a href="mailto:paulojjs@gmail.com" target="_blank">paulojjs@gmail.com</a>></div>
</div></div>