Conditional purging possible?

gaute at pht.no gaute at pht.no
Fri Sep 14 15:31:22 CEST 2007


On Thursday 13 September 2007 22:51:55 Poul-Henning Kamp wrote:
> In message <46E9798D.2040902 at redhat.com>, Warren Togami writes:
> >http://download.fedora.redhat.com/pub/fedora/linux/development/i386/os/rep
> >odata/
> >
> >If repomd.xml is a cache miss, I want all other files in this directory
> >to be purged from the cache.  Is it possible for VCL to do this?
>
> No.
>
> First because we don't have a concept of directories, to Varnish
> all we have is a URL string.
>
> But second, and more importantly, because we don't have acess to anything
> but the current object.

How about having vcl_miss somehow notify an external script?
If you could do that, and you can predict all possible filenames, you could 
just generate PURGE requests externally.

If you could rewrite the request to hit your script instead of repomd.xml but 
have vcl_hash work on the original string, and the script returning the 
content of repomd.xml, I guess you would have a notification mechanism..

Not totally sure if this is doable in the current release tho, I'm still 
running 1.0.4

Hm.. I guess you could use the "drop into C" option as well...

Regards

Gaute Amundsen









More information about the varnish-misc mailing list