Re: [squid-users] Re: refresh_pattern question

From: Manjusha Maddala <mmaddala25_at_nextag.com>
Date: Wed, 23 Dec 2009 16:34:37 -0800

>From "Squid - the definitive guide", a simplified description of the
refresh_pattern algorithm is:

- The response is stale if the response age is greater than the
refresh_pattern max value.
- The response is fresh if the LM-factor is less than the
refresh_pattern percent value.
- The response is fresh if the response age is less than the
refresh_pattern min value.
- Otherwise, the response is stale.

The webserver I have neither sends a Last-modified header nor an Expires
header.

> >From squid.conf,
> > refresh_pattern . 21600 100% 21600 override-expire
> >
> > That is, a cached page is fresh if its age in cache < 15 days
> > (21600=15*24*60).
>
>
> not quite, an object without an explicit expiry time, but that can be
> validated, could be stale in less than 15 days.
>

So, won't all pages with response age < 15 be considered fresh?

On Wed, 2009-12-23 at 16:10 -0800, RW wrote:
> On Wed, 23 Dec 2009 15:10:34 -0800
> Manjusha Maddala <mmaddala25_at_nextag.com> wrote:
>
> > Hi,
> >
> > >From squid.conf,
> > refresh_pattern . 21600 100% 21600 override-expire
> >
> > That is, a cached page is fresh if its age in cache < 15 days
> > (21600=15*24*60).
>
> not quite, an object without an explicit expiry time, but that can be
> validated, could be stale in less than 15 days.
>
> see override-lastmod
>
> > I noticed that sending HTTP requests to pages older than 30 days
> > result in TCP_REFRESH_MISS while requests for pages cached in the
> > last 30 days either result in TCP_HIT or TCP_MISS. Since the min time
> > for refresh_pattern is 15days, shouldn't it be like pages older than
> > 15days should be validated against the parent
> > (REFRESH_MISS/REFRESH_HIT) while all other pages are either TCP_HIT
> > or TCP_MISS. How did the limit change from 15 to 30? Has anybody else
> > seen such an anamoly?
>
> It's not an anomally - from the sample squid.conf file:
>
> override-expire enforces min age even if the server
> sent an explicit expiry time
> ...
> Note: this does not enforce staleness - it only extends
> freshness / min. If the server returns a Expires time which
> is longer than your max time, Squid will still consider
> the object fresh for that period of time.
>
>
> > Also, if there's no refresh_pattern matching a URI, how would Squid
> > process that HTTP request? Would it get a fresh copy from the parent
> > or will it return the cached copy?
>
> Presumably the heuristic algorithm for freshness would be disabled
> and anything without an explicit expiry time would be stale. It's not
> really a sensible thing to do though.
>
>
> >
> > CONFIDENTIALITY NOTICE
> > =======================
> > This email message and any attachments are for the exclusive use of
> > the intended recipient(s) and may contain confidential and privileged
> > information. Any unauthorized review, use, disclosure or
> > distribution is prohibited. If you are not the intended recipient,
> > please contact the sender by reply email and destroy all copies of
> > the original message along with any attachments, from your computer
> > system. If you are the intended recipient, please be advised that
> > the content of this message is subject to access, review and
> > disclosure by the sender's Email System Administrator.
> >
>
Received on Thu Dec 24 2009 - 00:34:45 MST

This archive was generated by hypermail 2.2.0 : Thu Dec 24 2009 - 12:00:02 MST