trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Hedstrom <zw...@apache.org>
Subject Re: question
Date Fri, 03 Jun 2011 14:52:40 GMT
Well, you can enable the verbose Via header in the response, that includes (among other things)
if it was served out of cache.

You can also write a plugin.

-- leif

On Jun 3, 2011, at 7:53 AM, "Mav Peri" <mav.peri@optasports.com> wrote:

> Thanks for the reply.
> 
> 
> Is there a way to force ATS to add an additional header indicating if it was served from
cache?
> 
>  
> 
> Thanks
> 
> 
> Mav
> 
>  
> 
> From: Leif Hedstrom [mailto:zwoop@apache.org] 
> Sent: 03 June 2011 14:50
> To: users@trafficserver.apache.org
> Cc: Mav Peri
> Subject: Re: question
> 
>  
> 
> On 06/03/2011 04:27 AM, Mav Peri wrote:
> 
> Hi,
> 
> 
> This is first I am asking a question in this format, so apologies in advance if this
is not the right way to do this!
> 
>  
> 
> Is it possible to check the headers returned by ATS to see if an item was served from
cache?
> 
> 
> Sort of, typically, the Age: header will give that indication (but not always, if e.g.
an upstream intermediary has added it). The "right" way to check if an object is in cache
or not is a request like
> 
> 
>     curl -s -D - -o/dev/null -H "Cache-Control: only-if-cached"  http://www.example.com/foo.png
> 
> 
> That will give a "200 OK" if it's in cache, and a "504 Not Cached" if not.
> 
> -- leif
> 
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email 
> ______________________________________________________________________

Mime
View raw message