[squid-users] Yet another store_id question HIT MISS

Amos Jeffries squid3 at treenet.co.nz
Sun Aug 21 13:17:50 UTC 2016


On 21/08/2016 2:10 a.m., Omid Kosari wrote:
> Amos Jeffries wrote
>> On 19/08/2016 2:15 a.m., Omid Kosari wrote:
>>> I was correct .
>>>
>>> If one of following conditions happens then the mentioned urls will not
>>> cache .
>>>
>>> 1-in squid.conf have this line
>>> acl storeiddomainregex dstdom_regex
>>> ^igcdn(\-photos|\-videos)[a-z0-9\-]{0,9}\.akamaihd\.net$ 
>>>
>>
>> How you use that ACL in your access rule logics is just as important as
>> what it contains / matches.
> 
> In my first email i have pasted other parts of config .
> 
> 
> 
> Amos Jeffries wrote
>>> 2-in storeid_db have this line
>>> ^http:\/\/igcdn-.*\.akamaihd\.net/hphotos-ak-.*/(t5.*?)(?:\?|$)
>>> http://instagramcdn.squid.internal/$1
>>
>>
>> The pattern is malformed. Several parts of it are impossible to match,
>> and just make it look complicated when its not.
>>
>> It is better written as:
>>
>> ^http:\/\/igcdn-[a-z0-9\-\.]+\.akamaihd\.net/hphotos-ak-[a-z0-9]+/(t5.*)
>>   http://instagramcdn.squid.internal/$2
> 
> Thanks for suggest but this one seems incorrect . At least i think the $2
> should be $1 . Apart from that i will use yours .
> 

Right - should be $1. Sorry, thats leftover from my own first attempt to
clean it up quickly.

Amos



More information about the squid-users mailing list