Re: Patch for squid short expiration time

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Sat, 29 Jul 2006 00:08:22 +0200

fre 2006-07-28 klockan 22:24 +0100 skrev Michael Pye:

> However this backport doesn't allow you to specifiy the minimum refresh
> time in seconds. You may have a situation where you want the minimum
> refresh time to be 20 seconds, but still have some other
> refresh_patterns that use 40 seconds.

Right, that was what those parts was about... must be a bit tired..

> Would it be possible to add this?

Yes.

> Eduards patch seems to allow you to
> add an 's' after the minumum refresh time to indicate secconds so either
> this or another directive like "minimum_refresh_seconds on" could be
> used where seconds is assumed in refresh_pattern min times. I would be
> happy to submit something for that. As its a new feature however I guess
> it needs to go into squid3 first?

Correct, but the code is basically the same in this area so there should
not be any issues porting the changes to squid3. You are welcome to give
it a shot.

Should be sufficient to just extend the refresh_pattern directive with
the ability to specify seconds. Internally it's seconds anyway as you
probably noticed, it's the config parser which translates from minutes
to seconds..

I am not very fond of the format. Would prefer

refresh_pattern min [unit] pct max [unit]

where unit is seconds/minutes/days, and defaults to minutes if not
specified. Makes the parser slightly more complex, but it's worth it I
think.

Regards
Henrik

Received on Fri Jul 28 2006 - 16:08:27 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Aug 01 2006 - 12:00:02 MDT