AW: New purging mechanism within Varnish

Norman Leutner n.leutner at
Thu Jul 30 17:49:24 CEST 2009

Thanks for the hint Kristian.

The hardest task has been to implement this within eZ Publish ;)

We're currently doing some test, but this seems to works fine for 
our eZ Publish cachemanager extension.

Best regards

Norman Leutner
all2e GmbH
Enterprise Content Management

-----Ursprüngliche Nachricht-----
Von: Kristian Lyngstol [mailto:kristian at] 
Gesendet: Freitag, 17. Juli 2009 14:52
An: Norman Leutner
Cc: varnish-dev at
Betreff: Re: New purging mechanism within Varnish

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.


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

More information about the varnish-dev mailing list