Search squid archive

Re: refresh_pattern defaults

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27/03/2014 3:30 p.m., Thomas wrote:
> Hi guys,
> 
> I've been searching for a while and could not find the answer to the
> 'refresh_pattern' default values if they're NOT defined in the
> configuration. On the config website it mentions "none" which I don't
> understand, because in order to calculate this:
> 
>>> How does Squid decide when to refresh a cached object
> 
> if (EXPIRES) {
>         if (EXPIRES <= NOW)
>             return STALE
>         else
>             return FRESH
>     }
>     if (CLIENT_MAX_AGE)
>         if (OBJ_AGE > CLIENT_MAX_AGE)
>             return STALE
>     if (OBJ_AGE > CONF_MAX)
>         return STALE
>     if (OBJ_DATE > OBJ_LASTMOD) {
>         if (LM_FACTOR < CONF_PERCENT)
>             return FRESH
>         else
>             return STALE
>     }
>     if (OBJ_AGE <= CONF_MIN)
>         return FRESH
>     return STALE
> 
> (taken from
> http://wiki.squid-cache.org/SquidFaq/InnerWorkings#How_does_Squid_decide_when_to_refresh_a_cached_object.3F)
> 
> 
> We need the refresh_pattern config values? I'm at a loss, have asked a
> good few linux friends etc using squid for a while with no good reply.

The above algorithm uses the server HTTP response header values as
primary source of input parameters.

The refresh_pattern directive is "just" a way to provide default input
parameters for the algorithm in the event that the server response
omitted any or all of them.

Squid is hard-coded with default algorithm parameters which are expected
to store things for up to 3 days in the event that refresh_pattern is
omitted from the config file entirely AND the server response provides
no values.

Amos




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux