Re: Patch for squid short expiration time

From: Michael Pye <michael@dont-contact.us>
Date: Sun, 30 Jul 2006 11:26:14 +0100

Henrik Nordstrom wrote:
> I am not very fond of the format. Would prefer
>
> refresh_pattern min [unit] pct max [unit]

I was about to have a bash at this using strsep instead of strtok to
parse the refresh_pattern as strsep allows you to test the next token as
well as the current token. This way you can check for optional tokens
like the units will be. strsep however is not as portable as strtok,
it's not in solaris for example, so we would need to include a test for
strsep and provide it if there is no system version. Does this seem
reasonable ?

The code for calculating the seconds based on unit size is already in
cache_cf.c function parseTimeUnits, so this bit should be fairly
straight forward.

--
Michael
Received on Sun Jul 30 2006 - 04:26:19 MDT

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