Matus UHLAR - fantomas <[EMAIL PROTECTED]> writes:
> On 13.09 19:03, Andrew M. Bishop wrote:
> > When I answered your previous e-mail I read the purge.c source code to
> > work out what might have gone wrong. This time I have read the
> > documentation and I find that I had thought about this before. It
> > does say that URLs that are marked not to be purged will not be.
> ...
> > max-size = (size)
> ...
> > min-free = (size)
> ...
>
> > After reconsidering the options (leave it as it is or change so that
> > the max-size/min-free options take priority) I have decided that I
> > will leave it as it is. There may be people that rely on it working
> > the way that it does. Certainly if people are using WWWOFFLE as a
> > permanent cache then if they have set an age of -1 to never delete a
> > cached file they should be able to expect that it will never be
> > deleted.
>
> Pardon me, the max-size and min-free were not my problem. The problem was
> in the "age=-1" which caused "not to delete". Previous setting "age=0"
> caused "not to keep" and I have no option "ignore age, use others".
You might think that the "age=-1" option means "ignore age, use
others" but in fact it means "don't delete whatever the age".
There is one other thing that setting "age=-1" will do that is not
obvious and is probably a bug. The default age (the one where the age
is not prefixed by a URL) is used as a scaling factor when deciding
which files to delete that have a different maximum age.
For example with the following settings:
Purge
{
max-size=100
<http://*/*> age=4w
<ftp://*/*> age=8w
age=-1
}
The default age is "never purge" but the http and ftp protocols have
their own different, smaller, maximum age. The problem is that they
will never be purged because the default age is -1.
I think the solution is to change to a percentage age scaling. If the
cache size is correct when files that are 50% of their maximum age are
purged then it means that files older than 2 weeks for http and 4
weeks for ftp will be deleted. Using a percentage rather than a
fraction of the default age is probably fairer and handles this
strange case as well.
> Actually, I think it would be better to use "-1" for each one as "don't
> consider this one", in which case "don't delete" would be configurable by
> setting all options "max-size", "min-free" and "age" to "-1".
The options min-free and max-size do use -1 to mean "don't consider
this one".
> Other possibility is to use age of "0" as "don't consider", because "don't
> keep" is already covered by DontCache section.
There is a difference between "age=0" and using the DontCache
section. The options in the Purge section only apply when a purge is
run. This means that even with "age=0" the file will stay cached
until you purge. The two are not the same thing so an age of zero
cannot be used for anything other than its current use.
--
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop [EMAIL PROTECTED]
http://www.gedanken.demon.co.uk/
WWWOFFLE users page:
http://www.gedanken.demon.co.uk/wwwoffle/version-2.8/user.html