Search squid archive

Re: Re: Problems checking if an object is in cache or not

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2013-12-05 06:07, RW wrote:
On Wed, 4 Dec 2013 15:45:42 +0000
Donoso Gabilondo, Daniel wrote:


I saw in internet that I should use squidclient with -t option to
check if an object is cached. Why need I enable TRACE on server  to
check if a object is cached in the client (Squid)?

I think it  would be -t 0 to get the trace from squid, but I don't
see how that would tell you whether the object is cached.


 I need to ask to
squid directly if an object is cached or not without server
intervention. How can I do it?

The headers in a GET response will tell you if it's served from cache
i.e. just leave out the -t.

Yes. Also add the header:
  Cache-Control:only-if-cached

That will make Squid produce an error instead of fetching a new copy from the server. It will not prevent revalidation the cache needs to do in order to be able to respond about certain types of cached object.

The big question though is why you need to do this at all? what is the use-case this fetch/test is part of?

Amos




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux