Mailing List Archive

Conditional purging possible?
http://download.fedora.redhat.com/pub/fedora/linux/development/i386/os/repodata/

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?

How often will varnish check to see if a file like repomd.xml has changed?

Warren Togami
wtogami at redhat.com
Conditional purging possible? [ In reply to ]
In message <46E9798D.2040902 at redhat.com>, Warren Togami writes:
>http://download.fedora.redhat.com/pub/fedora/linux/development/i386/os/repodata/
>
>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.

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
Conditional purging possible? [ In reply to ]
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