trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reindl Harald <>
Subject Re: cache miss checklist
Date Sat, 15 Jun 2013 23:36:21 GMT

Am 16.06.2013 01:20, schrieb Tom Melendez:
> Brought up a new ATS server, configured as a reverse proxy, and I'm seeing that none
of my requests are being
> cached.  Think you can help me walk through what's up?  I suspect it's something trivial

> ###
> # typical header returned from server
> ###
> HTTP/1.1 200 OK

this is *uninteresting* and does not say anything about
if ATS has served the file from it's cache or requested
again from the origin - look in the accesslog of the
origin server to see "304" responses or in the best case
*nothing* while the client gets the document served
with a "200 OK"

*which type* of content?

normally you do *not* want answers with session cookies cached
because if this happens whoever get the content of whoever
was logged in before and that is why mostly only static
content is and shoud be cached

additionally the caching headers of the orgin server are important
and if you orginin server sends "no cahce "headers any proxy has to
respect them

CONFIG proxy.config.http.cache.cache_responses_to_cookies INT 3

    Default: 3

    Specifies how cookies are cached:

        0 = do not cache any responses to cookies
        1 = cache for any content-type
        2 = cache only for image types
        3 = cache for all but text content-types

to get static htm/js/css cached for 30 or 60 seconds:

# cache.config

url_regex=. suffix=css ttl-in-cache=30 cache-responses-to-cookies=1
url_regex=. suffix=js ttl-in-cache=30 cache-responses-to-cookies=1
url_regex=. suffix=txt ttl-in-cache=60 cache-responses-to-cookies=1
url_regex=. suffix=htm ttl-in-cache=60 cache-responses-to-cookies=1
url_regex=. suffix=html ttl-in-cache=60 cache-responses-to-cookies=1
url_regex=. suffix=xml ttl-in-cache=60 cache-responses-to-cookies=1
url_regex=. suffix=htc ttl-in-cache=60 cache-responses-to-cookies=1

httpd config snipped to control how long different content types are cached

<IfModule mod_expires.c>
 ExpiresActive On
 ExpiresByType image/jpeg A60
 ExpiresByType image/jpg A60
 ExpiresByType image/gif A60
 ExpiresByType image/png A60
 ExpiresByType text/css A60
 ExpiresByType text/html A60
 ExpiresByType text/javascript A60
 ExpiresByType text/comma-separated-values A60
 ExpiresByType text/tab-separated-values A60
 ExpiresByType application/javascript A60
 ExpiresByType application/x-javascript A60
 ExpiresByType application/xhtml+xml A60
 ExpiresByType application/xml A60

View raw message