On 04/12/10 16:10, Brandon Prudent wrote:
I'm having a strange problem with a test squid3 setup. Here's the stack:
Debian Etch
squid3-stable8
Apache2
PHP 5.2.6
Pressflow 6.19.96
Here are some relevant (I think) configuration lines from my squid.conf:
http_port 3128 accel defaultsite=hbc.carousel30.com
cache_peer 127.0.0.1 parent 80 0 no-query originserver
acl cookie_logged_in_set rep_header Set-Cookie LOGGED_IN=Y
cache deny cookie_logged_in_set
acl cookie_logged_in_out rep_header Cookie LOGGED_IN=Y
cache deny cookie_logged_in_out
acl cookie_logged_in req_header Cookie LOGGED_IN=Y
cache deny cookie_logged_in
acl forbidden http_status 403
cache deny forbidden
cache allow all
Now here's the weird thing - check this curl output:
* About to connect() to hbc.carousel30.com port 3128 (#0)
* Trying 10.1.1.30... connected
* Connected to hbc.carousel30.com (10.1.1.30) port 3128 (#0)
GET /public-relations HTTP/1.1
User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3
Host: hbc.carousel30.com:3128
Accept: */*
Anything with this URL is able to be fetched...
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
<snip>
< ETag: "1291428584"
<snip>
< X-Cache: HIT from hbc.carousel30.com
<snip>
... so the "1291428584" copy is returned from storage.
Looks like it worked, right? But check out these LiveHTTPHeaders from Firefox:
http://hbc.carousel30.com:3128/public-relations
GET /public-relations HTTP/1.1
<snip>
If-None-Match: "1291430283"
Reply with details if what you have is not "1291430283"...
(cached copy being "1291428584" as per above).
HTTP/1.0 200 OK
<snip>
Etag: "1291431675"
<snip>
X-Cache: MISS from hbc.carousel30.com
X-Cache-Lookup: MISS from hbc.carousel30.com:3128
Via: 1.0 hbc.carousel30.com (squid/3.0.STABLE8)
Connection: keep-alive
... so a new copy is fetched.
MISS every time! Safari is definitely HIT because it's coming back
lickety-split. Any ideas? Anyone seen this kind of thing before?
Squid-3.0 does not fully support the If-None-Match feature of HTTP/1.1.
It knows just enough to identify that the ETag are different and does
not present the cached copy in case it would screw things up.
Support for this feature is mostly done in 3.2 beta releases now. With
some patches in bugzilla needed to make it reliable.
Amos
--
Please be using
Current Stable Squid 2.7.STABLE9 or 3.1.9
Beta testers wanted for 3.2.0.3