Re: [squid-users] I Want To Ping A Cache Object

From: Solomon Asare <[email protected]>
Date: Mon, 1 Oct 2007 10:14:19 -0700 (PDT)

Hi All,
thanks for the responses. I guess what I need is
something like:

squidclient -m HEAD -H 'Max-Forwards = 0\n'
http://www.google.com

It fetches only the HEADERS so I can grep for
'X-Cache: HIT from mySquid'. I think it still contacts
the origin server on a MISS. I will prefer if it
remained a local affair without contacting the remote
server at all. But it works without much delay.

Thanks,
solomon.

--- Adrian Chadd <adrian@creative.net.au> wrote:

> On Mon, Oct 01, 2007, Andreas Pettersson wrote:
> > Adrian Chadd wrote:
> > >On Mon, Oct 01, 2007, Solomon Asare wrote:
> > >
> > >>Hi All,
> > >>please, how do I tell I have an object in my
> cache
> > >>without fetching the object. I want a command
> like:
> > >>"wget --spider", but where I access only the
> cache
> > >>without going to the origin server if the object
> is
> > >>not available in the cache.
> > >>
> > >
> > >Hm; if squid can't do it then I can see how to do
> it pretty easily.
> > >(Ie, check for the existance of a custom header
> which tells squid not
> > >to forward the request.)
> > >
> >
> > # wget --header=""Cache-Control: only-if-cached"
> "http://www.freebsd.org/"
>
> Cool. :)
>
>
>
>
> Adrian
>
>
Received on Mon Oct 01 2007 - 11:14:27 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Nov 01 2007 - 13:00:00 MDT