Re:Re: A question about "clientProcessExpired" function.

From: <maer727@dont-contact.us>
Date: Tue, 9 Apr 2002 19:45:44 +0800 (CST)

Hi, Henrik pal!

Thanks for your reply. I have known the aim of the function. But why should we use such statements in
this function? Such are my opinions:

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
In file "client_side.c", line 355, there are such statements,
     if (clientOnlyIfCached(http)) {
         clientProcessOnlyIfCachedMiss(http);
         return;
     }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I think if "(clientOnlyIfCached(http))" returns true, it means the client only want to get the object from
cache. But the aim of the function is to used for revalidation for expired objects. So if clients want to
get object only from cache, we should use "clientProcessOnlyIfCachedMiss(http)" to retuen an error.
(Since the object is out of date.)

Am I correct? :-)

Best regards,
Geoege, Ma

----- Original Message -----
From: Henrik Nordstrom
To: maer727@sohu.com ;squid-dev@squid-cache.org
Cc: squid-dev@squid-cache.org
Subject: Re: A question about "clientProcessExpired" function.
Sent: Tue Apr 09 17:05:54 CST 2002

> On Tuesday 09 April 2002 06:03, maer727@sohu.com wrote:
>
> > 1. After reading for several times, I can not find the goal the
> > function "clientProcessExpired". What is it used for?
>
> Processing of requests where the cached entry has expired and needs
> to be revalidated before given to the user.
>
> >
> > 2. In file "client_side.c", line 355, there are such statements,
> > if (clientOnlyIfCached(http)) {
> > clientProcessOnlyIfCachedMiss(http);
> > return;
> > }
> >
> > I think the "clientOnlyIfCached" is used to check whether an object
> > coule be taken from cache. "clientProcessOnlyIfCachedMiss" is used
> > to return an error when the specific object is not in cache. But I
> > think the above four lines of the statements do not conform the
> > following comments.
>
> clientOnlyIfCached checks if the client requested to have the object
> only satisfied from cache, disallowing any network retreivals.
>
> See the meaning of "Cache-control: only-if-cached" in RFC2616.
>
> > The comments are,
> > /*
> > * check if we are allowed to contact other servers
> > * @?@: Instead of a 504 (Gateway Timeout) reply, we may want
> > to return * a stale entry *if* it matches client requirements
> > */
>
> Yes. This looks correct.
>
> Regards
> Henrik
Received on Tue Apr 09 2002 - 05:45:51 MDT

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