Re: A question about "clientProcessExpired" function.

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 9 Apr 2002 11:05:54 +0200

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 - 03:19:14 MDT

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