New purging mechanism within Varnish
Kristian Lyngstol
kristian at redpill-linpro.com
Fri Jul 17 14:52:13 CEST 2009
On Fri, Jul 17, 2009 at 01:35:10PM +0200, Norman Leutner wrote:
> I spoke to Jan William and Per Andreas at the eZ Conference in Paris.
>
> They mentioned that there will be a new purging mechanism based on Object ID's within the header information
> within Varnish in one of the further versions.
Since Varnish 2.0.3 the 'purge' keyword can be used (both in VCL and cli),
which allows fairly dynamic purging, including purging based on
header-content.
Example:
sub vcl_recv
{
if (foo) {
purge("req.http.bar" == req.http.foo);
}
}
(Could be some typos with regards to the "", I haven't used this enough to
get it under my skin quite yet).
This would purge content where the Bar-header has the same content as the
Foo header of the request that caused the purge.
Hopefully, this should get you started. It can be used for virtually any
variable that's accessible from VCL.
--
Kristian Lyngstøl
Redpill Linpro AS
Tlf: +47 21544179
Mob: +47 99014497
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20090717/cf06f200/attachment-0003.pgp>
More information about the varnish-dev
mailing list