Re: Not seeing a successful purge

2010-02-15 Thread Tollef Fog Heen
]] John Norman | I think it's the backend's (Apache/Passenger) header: | | Vary: Accept-Encoding,User-Agent | | Which seems to prevent (???) this from working in my vcl_hash: | | if (req.http.Accept-Encoding ~ gzip) { | set req.hash += gzip; | } // etc No, that works fine, but is

Re: Not seeing a successful purge

2010-02-12 Thread Laurence Rowe
Hi, Your PURGE request is getting a different hash than your browser requests because there is no Accept-Encoding header on the PURGE. (You see the same problem when using Vary on the response). See http://varnish-cache.org/wiki/Purging. You can either use purge(req.url ~ req.url); in

Re: Not seeing a successful purge

2010-02-12 Thread John Norman
Here's a bit more on my purge problem -- a comparison of a purge that works on my development machine, vs. one that doesn't work on my staging system. On both, the browser request goes to haproxy, then to varnish. The VCL is identical, as quoted in a prior e-mail. The backends are different: on

Re: Not seeing a successful purge

2010-02-12 Thread John Norman
I think it's the backend's (Apache/Passenger) header: Vary: Accept-Encoding,User-Agent Which seems to prevent (???) this from working in my vcl_hash: if (req.http.Accept-Encoding ~ gzip) { set req.hash += gzip; } // etc The Varnish doc says: But by default, Varnish will perform no

Re: Not seeing a successful purge

2010-02-12 Thread Ken Brownfield
For any cache, not just Varnish, the Accept-Encoding header used for the purge (or a regular cache hit) must match the request header /exactly/. If you use anything other than exactly Accept-Encoding: gzip,deflate your purge will miss. So this is the expected behavior, AFAIK. Any other