Hi,
given the massive amount of replies to my post (i.e. none), I'll answer
it myself just in case someone is interested. I eventually understood by
re-reading for the 100th time the refresh_pattern docs and by trial and
error that:
Min_age ensures freshness
Max_age ensures staleness
Therefore for the behaviour I'm after which is 'keep anything in cache
for x amount of time no matter what', the following pattern works:
refresh_pattern . x 100% x ignore-reload override-lastmod \
override-expire
While the refresh_pattern i started with (min_age = 0, max_age = x)
ensured that objects were stale after x, but not that they were fresh
before x.
Anyway that's the way I see it. If I just said something silly please
correct me.
Cheers, Eb.
Eric Blanchi wrote:
Hi,
just re-prompting this question:
1. Is it possible to achieve the behaviour described below?
2. If so would either refresh pattern work to achieve it:
refresh_pattern . 0 100% 100 ignore-reload override-lastmod \
override-expire
refresh_pattern . 100 100% 100 ignore-reload override-lastmod \
override-expire
Cheer, Eb.
Eric Blanchi wrote:
Hi,
I'm not sure I understand the refresh_pattern parameters so I was
wondering if someone could confirm this.
I'm using Squid as a reverse proxy. I would like to keep pages in the
cache for a certain amount of time, irrelevant from any creation date,
last modified date or expiry date.
Say for example keep everything for 100 minutes in the cache.
I would like to obtain the following behaviour:
- client hits reverse proxy, item is not in cache.
- proxy fetches from actual source and caches the object.
- For the next 100 minutes any request will only hit the cache.
- client hits after 100 minutes (e.g. 101), proxy sees page as stale,
fetches from actual source, re-caches the object for another 100 mins.
Is the following line correct:
refresh_pattern . 0 100% 100 ignore-reload override-lastmod \
override-expire
--
Eric B. Blanchi