Re: Squid 2.3.STABLE1 not detecting stale content

From: Clifton Royston <cliftonr@dont-contact.us>
Date: Mon, 7 Feb 2000 11:33:08 -1000

On Fri, Feb 04, 2000 at 02:00:44PM -0500, Marc Evans wrote:
> I am running squid version 2.3.STABLE1 as an accelerator for
> www.state.nh.us. I have received reports of and verified that updated
> content on the originating site (oldwebster.state.nh.us) is not detected
> by the squid accelerator for upwards of 30 minutes. This is proving to be
> a severe problem, for example with things like winning lottery numbers.
>
> What I am wondering is has anyone else seen this type of problem?
>
> Let me detail an experiment I have done:
>
> 1) use any browser to view www.state.nh.us/lottery/nhlotto.htm
> 2) run "touch lottery/*" on the originating server.
> 3) manually retype the URL in step 1 (don't use reload/refresh).
> 4) observe squid log "TCP_IMS_HIT:NONE" for all graphics.
>
> My expectation is that I should have seen TCP_IMS_MISS in the log.

Consider:

  How is the Squid accelerator supposed to know that the original file
has been changed?

  If it is to always reflect the change *instantly* then you need to
force Squid to always query the origin server (with at least an IMS
type query) for every request. This will defeat most of the purpose of
using Squid as an accelerator, but will give you instantaneous updates.

  Basically, you need to decide what your acceptable policy is, in
terms of freshness, and then express it in the squid.conf file, via the
refresh_pattern section.

  The default of:
# usage: refresh_pattern [-i] regex min percent max [options]
refresh_pattern . 0 20% 4320

  means that all files not matching some other pattern, and not
containing an expires header, should be considered stale (and rechecked
against the source) if they are over 4320 seconds old (72 minutes), or
if it has been > 20% the "age" they had when last retrieved. If you
want to cut down the maximum time anything sits in the cache unchecked
to 5 minutes, you'd change the 4320 to 300.

  -- Clifton

-- 
 Clifton Royston  --  LavaNet Systems Architect --  cliftonr@lava.net
        "An absolute monarch would be absolutely wise and good.  
           But no man is strong enough to have no interest.  
             Therefore the best king would be Pure Chance.  
              It is Pure Chance that rules the Universe; 
          therefore, and only therefore, life is good." - AC
Received on Mon Feb 07 2000 - 14:40:48 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:51:00 MST