[squid-users] Question about Expires header and TCP_REFRESH_HIT

From: Piotr Ślatała <dokosza_at_sepio.pl>
Date: Tue, 9 Sep 2008 11:22:52 +0200 (CEST)

Hi,
I'm using: Squid Cache: Version 2.6.STABLE13

I'm caching in accelerator mode(or should I say - reverse proxy), for
example pictures, with 6hours expiry time. After this time, I'd like cache
to check newer versions. I use refresh_pattern:

refresh_pattern -i \.gif$ 60 90% 720 override-expire override-lastmod
ignore-reload

I've been also trying without override-expire(and lastmod). The problem
is, after 6 hours, cache do invalidate its content, but receives 304 Not
Modified from server and doesn't change expires date:
1220889578.703 10 83.31.43.112 TCP_REFRESH_HIT/200 1538 GET
http://mypage/mypicture.gif - FIRST_UP_PARENT/front2 image/gif

Today, 2008-09-09, I have in headers:
http://mypage/mypicture.gif

GET /mypicture.gif HTTP/1.1
Host: mypage
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.16)
Gecko/20080702 Firefox/2.0.0.16
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: pl,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
If-Modified-Since: Fri, 05 Sep 2008 06:49:18 GMT
If-None-Match: "613727-77eff780"

HTTP/1.x 304 Not Modified
Date: Fri, 05 Sep 2008 07:56:18 GMT
Content-Type: image/gif
Expires: Fri, 05 Sep 2008 13:56:18 GMT
Last-Modified: Fri, 05 Sep 2008 06:49:18 GMT
Etag: "613727-77eff780"
Age: 15380
X-Cache: HIT from mypage
X-Cache-Lookup: HIT from mypage:3128
Via: 1.0 mypage:3128 (squid/2.6.STABLE13)
Connection: keep-alive
----------------------------------------------------------

Especially:
Date: Fri, 05 Sep 2008 07:56:18 GMT
Expires: Fri, 05 Sep 2008 13:56:18 GMT
Expires is 6 hours after Date, as You can see, but, today we have
2008-09-09 :) When I turn off the squid, I also receive 304 Not Modified,
but with valid expiry time:

http://mypage/mypicture.gif

GET /mypicture.gif HTTP/1.1
Host: mypage
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.16)
Gecko/20080702 Firefox/2.0.0.16
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: pl,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
If-Modified-Since: Fri, 05 Sep 2008 06:49:18 GMT
If-None-Match: "613727-77eff780"

HTTP/1.x 304 Not Modified
Date: Tue, 09 Sep 2008 08:52:24 GMT
Server: Apache
Connection: Keep-Alive
Keep-Alive: timeout=5, max=500
Etag: "613727-77eff780"
Expires: Tue, 09 Sep 2008 14:52:24 GMT
Cache-Control: max-age=21600, must-revalidate
----------------------------------------------------------

Do You have any idea why it behaves this way? I found something similar:
http://www1.uk.squid-cache.org/mail-archive/squid-users/200602/0305.html
but this topic has no clues. How can I force squid to change expiry time?
Is there any other way, than disabling 304 in Apache?

Best Regards,
Peter
Received on Tue Sep 09 2008 - 09:23:01 MDT

This archive was generated by hypermail 2.2.0 : Mon Sep 15 2008 - 12:00:03 MDT