Search squid archive

Re: refresh_pattern

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

 



Hi,

no, Squid does not send an IMS GET request in this case, it directly serves the "stale" content (although new content is available on origin server). 

It is strange to me that it seems to depend from lm-factor/percent, since no last-mod header is available. So percent should not be used, should it?

Regards,
Micky


-------- Original-Nachricht --------
> Datum: Wed, 26 Aug 2009 13:28:46 +1200
> Von: Amos Jeffries <squid3@xxxxxxxxxxxxx>
> An: mickymax@xxxxxx
> CC: squid-users@xxxxxxxxxxxxxxx
> Betreff: Re:  refresh_pattern

> On Tue, 25 Aug 2009 21:11:53 +0200, mickymax@xxxxxx wrote:
> > Hi,
> > 
> > I am trying to fully understand the refresh algorithm Squid is using:
> > 
> > FRESH if expires < now, else STALE
> > STALE if age > max
> > FRESH if lm-factor < percent, else STALE
> > FRESH if age < min
> > else STALE
> > 
> > I disabled the last-modified header on my apache server for an objekt
> > test.html for testing purposes.
> > My refresh_pattern looks like this:
> > refresh_pattern test3           10      10%     300
> > 
> > If I request something like
> > echo -e "GET http://example.com/test.html HTTP/1.0\n\n" | netcat
> > example.com 80
> > 
> > the answer from squid is
> > HTTP/1.0 200 OK
> > Date: Tue, 25 Aug 2009 19:01:46 GMT
> > Server: Apache/2.2.6 (Unix) PHP/5.2.5
> > ETag: "4d04f6-2-f4490a00"
> > Accept-Ranges: bytes
> > Content-Length: 2
> > Content-Type: text/html
> > Age: 346
> > X-Cache: HIT from example.com
> > Via: 1.0 example.com (squid/3.0.STABLE18)
> > Connection: close
> > 
> > 
> > It is strange to me that Squid always produces a hit. Since the object
> does
> > not have a last-modified or expires header, the Squid algorithm should
> look
> > simply like this:
> > STALE if age > max
> > FRESH if age < min
> > else STALE
> > 
> > But both: age>max and age < min do not work (no refresh of the object is
> > done via Squid), Squid is still caching the object. It only changes if I
> > set percent to 0%, then I receive a MISS, but percent should not be used
> > (since no last-modified-header), should it?
> > 
> > I would appreciate any explanations.
> 
> Sounds a bit like bug #7 being hit.
> 
> Also check your access.log to see what type of HIT it is.
> You may be getting TCP_REFRESH_HIT (server IMS queried and it replied
> 'object not changed') instead of TCP_HIT (object from cache, no backend
> contact). Bug #7 means the old headers can get sent on the first case.
> 
> Amos

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

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

  Powered by Linux