Re: Some questions on Squid rules

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 13 Aug 2001 22:49:08 +0200

Zhang Luwei wrote:

> Why is Last-Modified stated in the second mentioned test condition, when
> the first test condition mentioned above already checks whether it is
> missing?

Because the two tests cover different and unrelated cases.

The first becasue the object is known to be stale and we don't even have
sufficient information to do cache revalidations.In such case there is
absolutely no point of caching the object as it is impossible to get a cache
hit on that data.

The second to catch a corner case in certain cache hierarchies, where there
is no reference for freshness if there is no date information to go on.
Without this condition such objects easily get stuck in the hierarchy.

The first condition (Last-Modified) is likely to change as more advanced
HTTP features like ETag gets to full use. The second is not.

> Is there a conflict between the two rules stated in the method?

Not really.

> (2)
> Why is Last-Modified more important than Expires field? The check on
> whether the "Last-MOdified" field is missing precedes any check on the
> "Expires" header field.

If we have a Last-Modified field, it is extremely likely the object can be
revalidated. Because of this it is beneficial to cache the object even if it
is already expired.

ps. Please send future Squid code questions to squid-dev@squid-cache.org.

--
Henrik Nordstrom
Squid Hacker
Received on Mon Aug 13 2001 - 15:05:31 MDT

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