trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mahakala <mahak...@gmail.com>
Subject Re: How to identify whether a object is cache hit from the response header
Date Tue, 24 Nov 2009 01:52:45 GMT
On Tue, Nov 24, 2009 at 5:35 AM, Leif Hedstrom <zwoop@apache.org> wrote:

>  On 11/22/2009 08:04 PM, mahakala wrote:
>
>
>
> On Mon, Nov 23, 2009 at 10:07 AM, Eric Balsa <ericb@apache.org> wrote:
>
>> You should be able to look at the Via: header that TS inserts on each
>> response. Inside the [ ] there are a set of characters. You can view
>> the translation of the characters in:
>>
>> cat traffic/trunk/proxy/http2/HttpTransact.h search for ViaString_t
>>
>>
>
> There's also a README for the the response Via: header
> "encoding",./proxy/http2/README.via. However, maybe even easier to test if
> an object is in cache or not is to send a request header like this with the
> request:
>
>      Cache-Control: only-if-cached
>
>
> If the requested URL can be served out of cache, you'll get a 200 OK. If
> not, you'll get a 504 response (I think). With command line curl, something
> like
>
>     curl -s -o /dev/null -D - -H "Cache-Control: only-if-cached" http://
> ...
>
>
> Cheers,
>
> -- leif
>
>
Thanks, Leif, I am reading on it.

Mahakala

Mime
View raw message