[SQU] Followup: cache digest negative hits and caching

From: Chris DeCenzo <decenzo@dont-contact.us>
Date: Wed, 07 Mar 2001 09:15:09 -0800

Thank you for the prompt reply.

After probing a bit deeper, I've found that requests to cache siblings are
passed the "only-if-cached" cache-control directive. This is hard-coded to
be the case in http.c:

Line 862:

     if (httpState->peer)
         if (neighborType(httpState->peer, httpState->request) == PEER_SIBLING)
             httpState->flags.only_if_cached = 1;

I also found that when "only-if-cached" header is passed and the page does
not exist in the cache, the HTTP 504 error is returned. (see:
client_side.c, "clientProcessOnlyIfCachedMiss()").

If you follow this back to the first cache, this 504 error in
"fwdReforwardableStatus()" will cause the page to have its expires time
reset to -1 (via call to "storeEntryReset()"), even though the page was
successfully fetched from the origin server after receiving this 504 error
from the sibling cache.

So, my questions are:

1) Why do we hold onto the 504 error status received from the sibling cache
when we were subsequently able to fetch the page from its origin server
successfully? This causes the page to not get cached.

2) Why do we send an "only-if-cached" directive when fetching from
siblings? Ideally, shouldn't this be configurable?

Again, thanks for the help!
-Chris

At 02:29 PM 3/5/01 -0700, Duane Wessels wrote:

>On Mon, 5 Mar 2001, Chris DeCenzo wrote:
>
> >
> > Hi.
> >
> > I notice that when I have a false cache hit among my sibling caches, the
> > page ultimately fetched from the origin web server is not cached.
> >
> > In other words:
> > - client sends request to first cache.
> > - first cache deduces from cache digest that page sits on second cache.
> > - first cache places request to second cache.
> > - second cache returns MISS.
> > - first cache places request to origin web server.
> > - first cache returns response from origin web server to client.
> > - first cache does not cache this response.
> >
> > Regarding the last step, why would the first cache not cache this
> response?
> > Is this by design?
> >
> > I am using Squid 2.3 stable 3 build with cache digests enabled. My Squid
> > caches are all siblings to one another (ie. no parents), and I would
> prefer
> > not to turn on miss_access among my sibling caches.
>
>It shouldn't be happening that way. Are you sure its not an isolated
>case? Maybe the page is uncachable for some other reason?
>
>--
>To unsubscribe, see http://www.squid-cache.org/mailing-lists.html

_______________________

Christopher DeCenzo
Liberate Technologies

decenzo@liberate.com
(650) 701-5223

2 Circle Start Way
San Carlos, CA 94070
_______________________

--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Wed Mar 07 2001 - 10:16:03 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:58:33 MST