Cache Purging via Mgmt Port vs. PURGE via HTTP

Loesche, Lukas, ZD-Scoyo lukas.loesche at bertelsmann.de
Wed Jul 23 13:27:55 CEST 2008


Hi,

I got a question regarding purging of cached data.

As I learned there¹s two ways to purge a file. Either using the management
port url.purge foo, or using a VCL rule.

My question is, when I use the VCL rule I transmit the PURGE /path/to/file
and Host: www.foobar.tld HTTP Headers. When I purge using the management
port I only transmit the url.purge ^/path/to/file$. What will happen when
the same /path/to/file exists on more than one HTTP Host? Will it purge both
versions, since I don¹t explicitely set the HTTP Host to purge from when
using the management port? Or will it purge none or only one version? If so
which one?

E.g. If varnish caches two files:
http://www.foo.bar/path/to/file.jpg
    and
http://user.foo.bar/path/to/file.jpg

and I url.purge /path/to/file.jpg.... Which version will be purged? The one
from www.foo.bar or the one from user.foo.bar or none?

Thanks,
-- Lukas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20080723/218cffdb/attachment-0001.html>


More information about the varnish-misc mailing list