Search squid archive

Re: Refresh pattern issue in squid 3.1.20

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for prompt response.

I want to match all the URL's which has a pattern of "wsj" (example: *.wsj.com, *.wsj.net, *.wsj.edu ) . Does wildcard makes sense in squid refresh pattern? Can we have something like this?

 refresh_pattern -i ^http://*\.wsj\.*/ 10 200% 10 \
    override-expire reload-into-ims
  

- Saravanan N

On Sun, Dec 27, 2015 at 7:15 PM, Amos Jeffries <squid3@xxxxxxxxxxxxx> wrote:
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
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux