Re: [squid-users] Look into the cache.

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Wed, 28 Aug 2013 08:32:27 -0600

On 08/28/2013 08:00 AM, Alfredo Rezinovsky wrote:

> I need to know if an URL is cached or not.
>
> could I use squidclient for that?
>
> If the object is cached I'll need to get it, if its a miss I just want
> to know it without getting it.

Try sending an HTTP request with Request-URI you are interested in and
with a "Cache-Control: only-if-cached" header. You should get a 504
(Gateway Timeout) error if the object is missing.

If you prefer to use squidclient, its -H command line option can be used
to send the extra header (do not forget \n though).

HTH,

Alex.
Received on Wed Aug 28 2013 - 14:32:49 MDT

This archive was generated by hypermail 2.2.0 : Wed Aug 28 2013 - 12:00:15 MDT