New purging mechanism within Varnish

Kristian Lyngstol kristian at
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


sub vcl_recv
	if (foo) {
		purge("" ==;

(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: <>

More information about the varnish-dev mailing list