Search squid archive

Re: refresh_pattern and same objects

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

 



On 1/09/2015 9:32 p.m., FredB wrote:
> 
>>>
>>> refresh_pattern -i \.(htm|html|xml|css)(\?.*)?$ 43200 1000% 43200
>>> -> This is my previous rule "http"
>>
>> Yes.
>>
>> Oh, and there is the less common .chm could be in that set too.
>>
> 
> 
> Ok added 
> 
> A last point there is a real difference between (\?.*)?$ and (?.*)?$ Here http://www.squid-cache.org/mail-archive/squid-users/201012/0002.html your advice was refresh_pattern -i \.(a|b|c|d)(?.*)?$  
> 

Yes there is. The version without '\' was a mistake causing invalid regex.

'?' is a reserved operator in regex. The intention is to match the
query-string starting with a '?' character. So the first one needs to be
escaped to become an exact-match. The second un-escaped to make the part
inside the brackets optional.

Amos

_______________________________________________
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