RE: [squid-users] Re: No Hits

From: Denis Vlasenko <[email protected]>
Date: Fri, 4 Jun 2004 14:12:22 +0300

On Friday 04 June 2004 08:56, Elsen Marc wrote:
> > but I have tried endless pages ... and have not received a single
> > cache hit ...
>
> How did you try this ?

I (try to) cache aggressively, and I don't mind violating HTTP
a bit to get more hits.

I did not measure exact cache hit % but I do get many hits.

This is part of my squid.conf:

# refresh_pattern
# NB: refresh calcs fail horribly if your system time is not ok ;)
# min/max in in minutes
# regex min percent max [options]
#
# FTP: min fresh time 1 day, max 10 days
refresh_pattern ^ftp: 2880 50% 28800
# GOPHER: min fresh time 1 day, max 1 day
refresh_pattern ^gopher: 2880 0% 2880
# Images/video
refresh_pattern -i [.]jpg$ 2880 50% 2880000 override-lastmod ignore-reload
refresh_pattern -i [.]jpeg$ 2880 50% 2880000 override-lastmod ignore-reload
refresh_pattern -i [.]gif$ 2880 50% 2880000 override-lastmod ignore-reload
refresh_pattern -i [.]png$ 2880 50% 2880000 override-lastmod ignore-reload
refresh_pattern -i [.]swf$ 2880 50% 2880000 override-lastmod ignore-reload
refresh_pattern -i [.]mp[g123]$ 2880 50% 2880000 override-lastmod reload-into-ims
refresh_pattern -i [.]mpeg$ 2880 50% 2880000 override-lastmod reload-into-ims
refresh_pattern -i [.]avi$ 2880 50% 2880000 override-lastmod reload-into-ims
# Data
refresh_pattern -i [.]gz$ 2880 50% 2880000 override-lastmod reload-into-ims
refresh_pattern -i [.]tgz$ 2880 50% 2880000 override-lastmod reload-into-ims
refresh_pattern -i [.]bz$ 2880 50% 2880000 override-lastmod reload-into-ims
refresh_pattern -i [.]bz2$ 2880 50% 2880000 override-lastmod reload-into-ims
refresh_pattern -i [.]zip$ 2880 50% 2880000 override-lastmod reload-into-ims
refresh_pattern -i [.]arj$ 2880 50% 2880000 override-lastmod reload-into-ims
refresh_pattern -i [.]rar$ 2880 50% 2880000 override-lastmod reload-into-ims
refresh_pattern -i [.]dat$ 2880 50% 2880000 override-lastmod reload-into-ims
# Probably generated content
refresh_pattern -i [.]php$ 0 20% 28800
refresh_pattern -i [?] 0 20% 28800
refresh_pattern -i cgi 0 20% 28800
# Probably plain HTML (first one is for http://host.com/dir/dir/ type URLs)
refresh_pattern -i /$ 2880 50% 2880000 override-lastmod reload-into-ims
refresh_pattern -i [.]htm$ 2880 50% 2880000 override-lastmod reload-into-ims
refresh_pattern -i [.]html$ 2880 50% 2880000 override-lastmod reload-into-ims
refresh_pattern -i [.]xml$ 2880 50% 2880000 override-lastmod reload-into-ims
refresh_pattern -i [.]css$ 2880 50% 2880000 override-lastmod ignore-reload
refresh_pattern -i [.]js$ 2880 50% 2880000 override-lastmod ignore-reload
# All other
refresh_pattern . 0 50% 28800

# If you want retrievals to always continue if they are being
# cached then set 'quick_abort_min' to '-1 KB'.
quick_abort_min 32 KB
quick_abort_max 64 KB

-- 
vda
Received on Fri Jun 04 2004 - 09:17:13 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jul 01 2004 - 12:00:02 MDT