On mån, 2007-09-17 at 11:55 -0700, Solomon Asare wrote:
> Hi Amos,
> I am not sure if refresh_pattern is the sole
> determinant in caching an object, that is if it has
> any influence at all.

It has influence, both directly by assigning freshness information when
there is none, and indirectly by overriding various HTTP controls..

Requirementsto cache stale objects:

a) The object must have a cache validator (Last-Modified or ETag). If
there is no cache validator then the response must be fresh for at least
minimum_expiry_time to get cached, this to avoid wasting disk I/O for
caching content which can not be reused.

b) There must not be other headers preventing it from getting cached.
refresh_pattern can override most of these if needed.

> I am not discussing getting a
> HIT for a cached object, but rather caching an expired
> object from an origin server. If this object is
> expired, by say 60 seconds before being served from
> the origin server, how do  I cache it? Date and
> Last-Modified dates are also not set.

If there is no Last-Modified and no ETag then it's useless to cache an
expired object, as it can not be reused on any future request and all
you get is extra disk I/O for writing the object out.

A cache validator (Last-Modified or ETag) is required to be able to
verify with the origin server if an expired object is still valid or
not. Without a cache validator there is nothing to relate to and there
is no other choice than to fetch the complete object again when
expired..

Regards
Henrik

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to