[squid-users] Testing squids cache.

From: <wh_at_msdrd.com>
Date: Thu, 23 Jul 2009 15:33:36 -0700

Hello.

Today I was looking at my access.log file trying to test how is my squid
conf behaving. I noticed that not much of the requested pages get
cached, this means even google.com. I ran the following command just to
see if some of the pages are getting served locally or being requested
by squid:

tail -f /var/log/squid/access.log | grep TCP_HIT

I request a page the first time and, ok, it doesn't get a hit since is
not cached. Now, I clear my local browser cache and try again. This time
the page still doesn't get cached, not even an image does. I check the
page's code and I don't see the no-cache meta in it.

Why is not getting cached? I've read that only 20% of the stuff gets
cached. Is that correct?

Please help me optimize my squid server.

Thanks in advanced.

Here's my squid.conf file:

# Port Squid listens on
http_port 192.168.2.1:3128 transparent

# Access-lists (ACLs) will permit or deny hosts to access the proxy
acl lan-access src 192.168.2.0/255.255.255.0
acl localhost src 127.0.0.1
#acl all src 0.0.0.0/0.0.0.0
acl CONNECT method CONNECT

# Access rule
http_access allow localhost
http_access allow lan-access

maximum_object_size 64000 KB

cache_mem 256 MB

access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log

cache_dir ufs /var/log/squid/cache 40000 255 255

htcp_port 0
icp_port 0

extension_methods SEARCH NICK
quick_abort_min -1 KB

negative_ttl 1 minutes

connect_timeout 90 seconds

dns_nameservers 196.3.81.5 200.88.127.22 196.3.81.132

logfile_rotate 5

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern . 0 20% 4320
Received on Thu Jul 23 2009 - 22:33:44 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 24 2009 - 12:00:05 MDT