Purging behaviour

Paulo Silva paulojjs at gmail.com
Sun Dec 6 11:54:43 CET 2015


Thank you, that did the trick :-).

2015-12-05 14:22 GMT+00:00 Guillaume Quintard <
guillaume at varnish-software.com>:

>
> On Dec 5, 2015 15:07, "Paulo Silva" <paulojjs at gmail.com> wrote:
> > 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)?
>
> Purge is not smart :-) it will purge a whole Objhead, ie. all objects with
> the same hash.
>
> Unfortunately, what you are doing stores the objects under different
> hashes.
>
> 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.
>



-- 
Paulo Silva <paulojjs at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20151206/b344b3f5/attachment.html>


More information about the varnish-misc mailing list