Thank you Leif, making those changes made it so that the image was
indeed cached, and subsequent attempts at retrieving them showed a cache
hit instead of miss.
I also learned now that the original settings were only going to cache
objects that returned from the origin server as "cacheable" with those
particular headers. Its probably easier to control what is cached in ATS
then in apache...
Thank you for your response,
Tim
On 1/29/14, 2:35 PM, Leif Hedstrom wrote:
On Jan 29, 2014, at 3:22 PM, Tim Traver <[email protected]
<mailto:[email protected]>> wrote:
Hi all,
1.
HTTP/1.1 200 OK Date: Wed, 29 Jan 2014 22:15:08 GMT Server:
ATS/4.1.2 Last-Modified: Wed, 02 Oct 2013 22:15:10 GMT ETag:
"14e57-4e7c9670a1780" Accept-Ranges: bytes Content-Length: 85591
X-Powered-By: PleskLin P3P: CP="NOI DEVa TAIa OUR BUS UNI STA"
Content-Type: image/png Age: 26 Connection: keep-alive Via:
http/1.1 scotte6 (ApacheTrafficServer/4.1.2 [uScMsSf pSeN:t cCMi
p sS])
Well, assuming you are using default configurations (which requires an
Expires: or Cache-Control: max-age= … header), the above is not
cacheable. However, the Age: 26 seems to imply something cached this,
how do you know this is not cached? The above is cacheable, if you
have changed records.config to
CONFIG proxy.config.http.cache.required_headers INT 1
(since there is a Last-Modified in the response).
To debug, If you send e.g.
curl -D - -o /dev/null -s -H “Cache-Control: only-if-cached”
http://some_url.com/foo.png
then if it’s a cache miss, you’ll get a 504, vs a 200 OK on a cache hit.
Next, the request header you show us is designed to bust all caches.
By default, ATS follows the RFC 2616 protocol, and allows the client
to do so, but you can disable that by making sure the following
configuration is set:
CONFIG proxy.config.http.cache.ignore_client_cc_max_age INT 1
Finally, a problem could be the old issue related to how we handled
the various accept headers. You could try to set (this works since you
are using 4.1.2):
CONFIG proxy.config.http.cache.ignore_accept_mismatch INT 2
CONFIG proxy.config.http.cache.ignore_accept_language_mismatch INT 2
CONFIG proxy.config.http.cache.ignore_accept_encoding_mismatch INT 2
CONFIG proxy.config.http.cache.ignore_accept_charset_mismatch INT 2
These are safe to set in v4.1.2 and later with a value of “2”, whereas
a value of “1” can break sites if they intend to Vary: on the
respective header. The default is off currently, but we plan on making
them set to “2” in 5.0.0. While we’re at it, make sure this is also
set (it’s the default);
CONFIG proxy.config.http.normalize_ae_gzip INT 1
I hope this helps.
— Leif