Hi
I'm fixing bug 1202 (it's a simple fix) and am cleaning up refresh.cc
at the same time.
I'd like to review the various refresh_pattern options, as some of
them are mutually exclusive in practice (although you can configure
all of them) and it's not clear from the documentation what they all
mean. They're quite hard to understand and use correctly.
1. reload-into-ims
The following is legal:
refresh_pattern html$ 5 20% 60 ignore-reload
reload-into-ims
but reload-into-ims will not have any effect. You could argue that
this is obvious, but I think it should be caught at parse time.
2. As an aside - but I want to mention it here - we need to make it
clearer that if an object does specify an expiry time, the Min,
Percent and Max values in refresh_pattern will be completely ignored,
but the options won't be. I'll change cf.data.pre accordingly
3. override-expire
override-expire enforces min age even if the server
sent a Expires: header. Doing this VIOLATES the HTTP
standard. Enabling this feature could make you liable
for problems which it causes.
If you do want to modify the behaviour of blindly obeying the
server's explicit expiry time, you can - to an extent.
The override-expire option enforces the Min time in cache, even if
the origin stated it should expire before then.
But it ignores the Max time (surprising!), and the L-M factor (more
expected - not obvious what this would do anyway)
It's not very intuitive. I think we should probably make this option
enforce the Max time as well. Possibly even ignore the explicit
expiry of the object altogether and fall back to last-modified factor??
It could be a naming thing... override-expire doesn't really say what
it does. enforce-min might be better. But then you've already stated
a min and might expect it to be already enforced.
4. override-lastmod
override-lastmod enforces min age even on objects
that were modified recently.
The Min time isn't enforced even when the last-modified factor
algorithm does kick in. If the object was only just modified and the
L-M factor algorithm results in a figure lower than the Min, it will
be considered fresh for less than the configured Min.
This isn't what I would expect. I know that the override-lastmod
exists to let you do this, but it's really non-intuitive. I think the
Min should always be enforced if we're using L-M factor algorithm,
and that we should therefore lose the override-lastmod option. Can't
see the point in the default (null) behaviour of Min otherwise.
Thoughts?
Doug
Received on Thu Jun 01 2006 - 06:19:28 MDT
This archive was generated by hypermail pre-2.1.9 : Fri Jun 30 2006 - 12:00:02 MDT