Re: caching using refresh_pattern? force pages to be cached

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sun, 28 May 2000 13:52:15 +0200

Karl Devitt wrote:

> HTTP/1.1 200 OK
> Content-type: text/html
> Server: SWS/2.7.40
> Connection: close
> Date: Tue, 23 May 2000 17:09:20 GMT
> Last-modified: Tue, 23 May 2000 17:09:20 GMT

Note. Last-modified indicates this object is 0 seconds old.

> I don't get Cache-Control, Expires or ETag, and presumably these are
> required for normal cacheable pages. Working under 2.2 Stable 5.

Not required. What is required is that there is no headers saying that
the object isn't cacheable. The above object will actually be cached,
but the default settings will revalidate it with the origin server on
every request.

> This is the config:
> refresh_pattern -i http://winifred.dcu.ie 0 20% 360 override-expire
> override-lastmod reload-into-ims ignore-reload
> If there is no expire field in the header would there be a problem with

The above refresh pattern still calculates to 0 seconds. 20% of 0 is
also 0, and the lowest value of 0 and 360 is 0.

The combination of a min age > 0 and override-lastmod will make the
above object cached.

> override-expire? Wasn't sure what the other options precisely do so
> tried it without them and then with, no difference as far as I can see.

override-expire makes the min age override an explicit expires header
sent by the origin server. Certainly not recommended unless you know
exacly what you are doing. And especially not recommended in an
accelerator since it upsets the expiry calculation between the
accelerator and downstream caches (including browser caches).

> Also what does the 20% do?

It is a percentage of the object age (date - last-modified header). Used
when no explicit expiry information is available.

--
Henrik Nordstrom
Squid hacker
Received on Sun May 28 2000 - 18:02:37 MDT

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