Norbert Hoeller wrote:
Although my squid server is only supporting three users, I am pleasantly 
surprised at the percentage of traffic handled by the cache.  However, I think 
I can do better.  Scanning the logs, I noticed a number of cases where the same 
files were resulting in a TCP_MISS/200 condition.  A lot are due to '?'-strings 
in the URL, even though the content is not always dynamic (I am researching 
options).

Making sure you don't have...

acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY

...in your squid.conf, in conjunction with the refresh_patterns you DO have are about as far as you can go without starting to break standards.

  However, I see a fair number of cases where I would expect the object to be 
cached.  Is there a process for diagnosing why squid thinks the object is not 
cache-able?

Up the debug_options for 22 and maybe 65. See http://wiki.squid-cache.org/KnowledgeBase/DebugSections for a list.

For example, from the access.log and store.log files:

1265776256.982   3934 10.1.2.123 TCP_MISS/200 861 GET 
http://www.facebook.com/images/loaders/indicator_blue_small.gif - 
DIRECT/66.220.146.18 image/gif
1265776281.912    370 10.1.2.123 TCP_MISS/200 861 GET 
http://www.facebook.com/images/loaders/indicator_blue_small.gif - 
DIRECT/66.220.146.18 image/gif
1265776294.352    407 10.1.2.123 TCP_MISS/200 861 GET 
http://www.facebook.com/images/loaders/indicator_blue_small.gif - 
DIRECT/66.220.146.18 image/gif

1265776256.982 RELEASE -1 FFFFFFFF 54F74EF7200473A70B1E94F452E355C0  200        
-1        -1 1265776256 image/gif 522/522 GET 
http://www.facebook.com/images/loaders/indicator_blue_small.gif
1265776281.912 RELEASE -1 FFFFFFFF D50A66A7F3C5E849631BF132637A99A3  200        
-1        -1 1265776281 image/gif 522/522 GET 
http://www.facebook.com/images/loaders/indicator_blue_small.gif
1265776294.352 RELEASE -1 FFFFFFFF 25AA53B40429083AF5B68BAF4A663EF0  200        
-1        -1 1265776294 image/gif 522/522 GET 
http://www.facebook.com/images/loaders/indicator_blue_small.gif

redbot.org returns:

HTTP/1.1 200 OK
    Accept-Ranges: bytes
    Cache-Control: max-age=2592000
    Content-Type: image/gif
    Expires: Sat, 13 Mar 10 22:37:08 GMT
    X-Cnection: close
    Date: Thu, 11 Feb 2010 22:37:08 GMT
    Content-Length: 522

General: The Expires header's value isn't a valid date.The Content-Length 
header is correct.The server's clock is correct.
Caching: This response can be stored by any cache.This response is fresh until 
4 weeks 2 days from now.This response can be served stale.
Partial Content: A ranged request returned the full rather than partial content

I am using a fairly vanilla squid.conf file, with the exception of some 
ad-blocking:

#Suggested default:
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern (cgi-bin|\?)    0       0%      0
refresh_pattern .               0       20%     4320

Any suggestions would be greatly appreciated!
         Thanks, Norbert

Chris

Reply via email to