Varnish Purging with URL in browser

Roberto O. Fernández Crisial roberto.fernandezcrisial at
Wed Apr 20 22:43:56 CEST 2011


I think you're looking for something like this, in your VCL (vcl_recv):

        if (req.url ~ ".*\?purge=true$")
                set req.http.X-Purge = regsub( req.url, "(.*)\?purge=true$",
"\1" );

I hope this helps you!

Roberto O. Fernández Crisial.

On Wed, Apr 20, 2011 at 5:24 PM, Varnish List <varnishlist at
> wrote:

> I am trying to figure out if it is at all possible to purge objects in the
> varnish cache through the URL in the browser.
> I have been able to purge using curl -X and the CLI but, say you have an
> object called image.jpg and you want to open your browser and type:
> In order to purge it ( TTL=0 ). Is this possible to do? Can it be
> implemented with VCL? If you know of a way to handle this please let me
> know.
> I'm somewhat convinced it can be done because it was mentioned here:
> Thanks!!!
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-misc mailing list