Re: [squid-users] Only 23% of traf is cached. Config problem?

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 29 Sep 2010 23:31:00 +0000

On Wed, 29 Sep 2010 13:39:29 -0700, Andrei <funactivities_at_gmail.com>
wrote:
> These are my Squid stats. I have about 23% of cache hits.
> We have 300 users. This is a school environment where most students
> access the same site at the same time for their classroom activity.
> Is there anything I should add or change to make the caching better,
> or is 23% to be expected?

<snip>
> access_log /var/log/squid3/access.log squid
> refresh_pattern ^ftp: 1440 20% 10080
> refresh_pattern ^gopher: 1440 0% 1440
> refresh_pattern (cgi-bin|\?) 0 0% 0
> refresh_pattern . 0 40% 40320
> icp_port 3130
> coredump_dir /var/spool/squid3
> refresh_pattern -i \.index.(html|htm)$ 0 40% 10080
> refresh_pattern -i \.(html|htm|css|js)$ 1440 40% 40320

re-ordering your refresh_patterns so your local ones will work will help
things a little. Otherwise as others have said this is fine.

The default . and cgi-bin refresh_patterns supplied by Squid MUST be last
on the list. Also note the updated syntax of the cgi pattern to prevent
early discarding of mis-matched URL:

> refresh_pattern -i \.index.(html|htm)$ 0 40% 10080
> refresh_pattern -i \.(html|htm|css|js)$ 1440 40% 40320

> refresh_pattern ^ftp: 1440 20% 10080
> refresh_pattern ^gopher: 1440 0% 1440

refresh_pattern -i (/cgi-bin/|\?) 0 0% 0

> refresh_pattern . 0 40% 40320

Amos
Received on Wed Sep 29 2010 - 23:31:05 MDT

This archive was generated by hypermail 2.2.0 : Thu Sep 30 2010 - 12:00:04 MDT