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.
Thx and regards,
Micky
-- Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02Received on Tue Aug 25 2009 - 19:12:06 MDT
This archive was generated by hypermail 2.2.0 : Wed Aug 26 2009 - 12:00:04 MDT