On 05/16/2011 01:24 PM, Moshe Kaplan wrote:
Hi,

Another question regarding PURGE,
We want to support the following user case:

   1. Purge single file from the cache (each time another file).
   2. Do that immediately based on external event using external software.

When we used PURGE (using cURL) in order to invalidate an object we found out the following behavior:

   1. GIF and JPG files were correctly invalidated (With 200 OK)
   2. HTML files were not invalidated (404)

When we investigated it, we founded out that probably it's due to the fact ATS saves several variations of the HTML file based on Accept-Encoding and User-Agent.

You are not doing Vary: UA are you? That's almost a certain way to bust your caches. For Accept-Encoding, I usually recommend enabling

    CONFIG proxy.config.http.normalize_ae_gzip INT 1


That will normalize the AE headers related to gzip, there are literally hundreds (if not thousands) of variation on this. Now this setting might violate 2616 (I'm not positive), but it's really the only sane way to cache CSS/JS/HTML when there's a Vary: ae (which typically means either gzip or uncompressed).

I'm going to add this option to the default records.config, albeit make it disabled by default (it's that useful I think).


We confirmed that by doing GET and PURGE using with cURL that results with 200, while browsing to the same page and then PURGE using cURL resulted with 404.

Yeah, this is a known problem, I thought we had a bug for this. But I can't find it now. Heck, I even had a patch for it, wonder what happend to that ... Anyone else remember ?


-- Leif

Reply via email to