Re: [squid-users] How to verify use of "no_cache"?

From: Alex Rousskov <[email protected]>
Date: Wed, 25 Jul 2001 16:17:43 -0600 (MDT)

On Wed, 25 Jul 2001, Stephane Blat wrote:

> If you don't see 304 return code , that means the page is not in the cache

Not true. 304 status code indicates that the page was not modified
since the date in If-Modified-Since request header. This code does not
tell you that a proxy cached (or did not cache) the page.

> Steve Snyder <swsnyder@home.com> on 25/07/2001 22:00:02
>
> How can I verify that in fact no objects from these domains are being
> written to the cache?

You cannot verify that unless you are willing to scan Squid cache
files directly, interpret the metadata and search cached URLs for the
domains in question.

If you know the complete set of URLs that belong to a domain OR if you
just want to verify if a particular page is not cached, you can (for
each URL) send a request with "Cache-control: only-if-cached" header.
If you get the page pack, the page was cached. If you get a response
with 504 status code, the page was not cached.

For a given response, you can also look at X-Cache header that Squid
appends. IIRC, X-Cache: HIT means that the content was served from the
cache (and, hence, was cached, at least partially, at the time the
response was being generated).

Finally, you can enable Squid debugging and trace its decisions when
domain names in question are processed.

In short, you cannot verify that no objects from a domain are being
written to cache. You can get a pretty good idea of whether your ACLs
and Squid are working correctly by using some of the hints above.

HTH,

Alex.
Received on Wed Jul 25 2001 - 16:17:54 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:01:19 MST