[squid-users] Refresh pattern issue in squid 3.1.20

Amos Jeffries squid3 at treenet.co.nz
Mon Dec 28 01:15:10 UTC 2015


On 28/12/2015 1:30 p.m., SaRaVanAn wrote:
> Hi,
> We are using squid 3.1.20 in our box. We are facing issues on configuring
> and validating the refresh patterns. It looks like squid is not honoring
> the refresh patterns properly.
> 
> 
> *configuration*
> *refresh_pattern -i ^http://.wsj./.* 10 200% 10 override-expire
> override-lastmod reload-into-ims ignore-reload*
> refresh_pattern -i \.(gif|png|jpg|jpeg|ico)$ 480 100% 480 override-expire
> override-lastmod reload-into-ims
> refresh_pattern -i \.(htm|html|js|css)$ 480 100% 480 override-expire
> override-lastmod reload-into-ims
> 
> refresh_pattern ^ftp:           1440    20%     10080
> refresh_pattern ^gopher:        1440    0%      1440
> refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
> refresh_pattern .               0       20%     4320
> 
> 
> As per above refresh pattern squid should refresh the cache every ten
> minutes for "*^http://.wsj./.*" .  *But I am always getting either
> TCP_HIT/TCP_MEM_HIT even after hours. Why is it so? . Please find the logs
> below

Because none of the log entries match the regex pattern "^http://.wsj./.*".

PS. the trailing ".* is useless, the other uses of '.' only match one
single character.


Try this for more correct behaviour:
  refresh_pattern -i ^http://[a-zA-Z]+\.wsj\.net/ 10 200% 10 \
    override-expire reload-into-ims

Amos


More information about the squid-users mailing list