Purging behaviour

Paulo Silva paulojjs at gmail.com
Sat Dec 5 14:59:01 CET 2015


I'm using varnish 4.1 and in my setup I'm using vcl_hash to save a
different version in cache if a cookie is present, something like this:

sub vcl_hash {
if (req.http.cookie ~ "mycookie=") {

 This bit is working very well but I was wondering how this will affect

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)?

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

More information about the varnish-misc mailing list