]> err.no Git - varnish/commit
Implement purging on either of hash or url.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 8 Aug 2007 19:43:51 +0000 (19:43 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 8 Aug 2007 19:43:51 +0000 (19:43 +0000)
commit665adc126ecfed9d0f6e228efc117639ebf62bf3
treefff7267a733f4d918bfef2496f64f98b85c1422e
parent36fb9f45702c6c13348e56a4cf241344b897bfeb
Implement purging on either of hash or url.

In VCL:
purge_url(<regexp>)
purge_hash(<regexp>)
(for an interrim period purge(<regexp>) will be the same as purge_url).
In CLI
url.purge <regexp>
hash.purge <regexp>

purge_hash operates on the hash-string which results from vcl_hash(),
by default it is composed of:

req.url "#" req.http.host "#"

To purge everything on the virtual host foo.bar.com:

In CLI:
url.purge "#foo.bar.com#$"

In VCL:
purge_hash("#foo.bar.com#$");

The general format, if you have defined vcl_hash(), is:

Each "req.hash +=" operator appends the right hand side of the
+= and a "#" separator.

You'll have to figure out your own regexps.

Under the hood:

Move the hash string from object to objecthead and save space while
we're at it.

Fix indentation in generated source.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1816 d4fa192b-c00b-0410-8231-f00ffab90ce4
varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_ban.c
varnish-cache/bin/varnishd/cache_cli.c
varnish-cache/bin/varnishd/cache_hash.c
varnish-cache/bin/varnishd/cache_vrt.c
varnish-cache/bin/varnishd/hash_classic.c
varnish-cache/bin/varnishd/hash_simple_list.c
varnish-cache/include/cli.h
varnish-cache/include/vrt.h
varnish-cache/lib/libvcl/vcc_action.c
varnish-cache/lib/libvcl/vcc_fixed_token.c