Squid3 not caching simple request and response

Posted by Nick Spacek on Server Fault See other posts from Server Fault or by Nick Spacek
Published on 2011-01-06T18:47:16Z Indexed on 2011/01/06 18:55 UTC
Read the original article Hit count: 276

Filed under:

Hi folks, I've pared down my squid.conf to try to figure this out:

http_port 80 accel defaultsite=host.to.cache
cache_peer ip.to.cache parent 80 0 no-query originserver

acl our_sites dstdomain host.to.cache
http_access allow our_sites

refresh_pattern .       1       20%     4320

Requests are being proxied correctly, so that's a start. Here's a request:

GET http://host.to.cache/path?some_param=true
Accept: */*
Accept-Charset: ISO-8859-1,utf-8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en
Connection: keep-alive
Host: host.to.cache
User-Agent: myuseragent

And the response:

Connection: keep-alive
Content-Length: 585
Content-Type: application/xml
Date: Thu, 06 Jan 2011 18:33:11 GMT
Via: 1.0 localhost (squid/3.0.STABLE19)
X-Cache: MISS from localhost
X-Cache-Lookup: MISS from localhost:80

The response has no caching-related headers, but I thought that refresh_pattern would set a default behavior for responses without caching-related headers. For my test, I wanted to cache everything for one minute at minimum.

Am I missing something obvious? I did take a peek at this question: Squid isn't caching

...and ran through the page here: http://www.mnot.net/cache_docs/ briefly, but didn't see anything relevant (not to say that there isn't, I could have missed something).

Thanks for any help.

© Server Fault or respective owner

Related posts about squid