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 <[EMAIL PROTECTED]> 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
> 
> 

Reply via email to