In my environment, we have the vcl_hash that uses "Accept-Encoding" as
one of hash keys. 

sub vcl_hash {
        set req.hash += req.url;
        set req.hash += req.http.host;
        if (req.http.Accept-Encoding ~ "gzip") {
               set req.hash += "gzip";
        }
        else if (req.http.Accept-Encoding ~ "deflate") {
                set req.hash += "deflate";
        }
        hash;
}

So, Varnish may have 3 hash versions of the same url. First is just for
no gzip/deflate client. Second is for gzip client. And third is for
deflate client.

If we need to purge the URL from backoffice (web server), we just purge
3 times for each URL by using CURL.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Poul-Henning Kamp
Sent: Monday, April 28, 2008 6:21 PM
To: Wichert Akkerman
Cc: [email protected]
Subject: Re: PURGE http method and compression. 

In message <[EMAIL PROTECTED]>, Wichert Akkerman writes:

>That's interesting. So the default VCL for HTTP PURGE requests will not

>purge all variants? How can a backend know which variants there are so
it 
>can purge all of them?

It probably can't, so if your backend returns "Vary:" headers, you
should
use the url.purge or hash.purge method.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by
incompetence.
_______________________________________________
varnish-misc mailing list
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc
_______________________________________________
varnish-misc mailing list
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to