Re: [squid-users] Help Squid 3.4.0.2 ytimg

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 12 Oct 2013 01:23:43 +1300

On 12/10/2013 1:05 a.m., Calode wrote:
> Hi Guys ,
>
> I am testing squid 3.4.0.2 on some jpg from ytimg ! , and it seems I can't make squid cache .
> no matter what I tried it just doesn't cache it !!! .
> my conf :
> acl = > acl rewritedoms url_regex -i \.ytimg\.com.*.(jpg|png)
> I tried a bunch of refresh pattern ...
> refresh => refresh_pattern \.ytimg\.squid\.internal\/.*(jpg|png) 172800 90% 172800 override-expire reload-into-ims ignore-auth ignore-reload ignore-private store-stale max-stale=7776000
>
> or refresh =>refresh_pattern ^.* 1080 80% 79900 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-store ignore-must-revalidate ignore-private ignore-auth refresh-ims store-stale
>
> and even => refresh_pattern ^http://(youtube|ytimg|vimeo|[a-zA-Z0-9\-]+)\.squid\.internal/.* 10080 80% 79900 ignore-auth override-lastmod override-expire ignore-reload ignore-must-revalidate ignore-private
>
> And it's still a TCP_MISS !?! can't figure out why !!
>
> my store-id code => } elsif ($x =~ m/^http:\/\/.*\.ytimg\.com\/(.+?)\/(.+?)\.(jpg)/) {
> $out="http://ytimg.squid.internal/" . $1 . $2 . "." . $3 ;
>
> streo-id logging enabled : in : 0 http://i1.ytimg.com/vi/pMr5W4bCP8s/mqdefault.jpg 172.16.35.22/- - GET myip=173.194.67.139 myport=80
> out: 0 OK store-id=http://ytimg.squid.internal/vipMr5W4bCP8s/mqdefault.jpg
>
> I even changed debug mode into ALL,9 , read the log so many times and I can't seem to figure out what is wrong !
>

Well. That image is cacheable for up to 6hrs according to HTTP. So the
default settings of Squid will be to cache it. At best your rules are
causing it to become non-cacheable somehow (I suspect the ignore-lastmod).

Amos
Received on Fri Oct 11 2013 - 12:23:50 MDT

This archive was generated by hypermail 2.2.0 : Sun Oct 13 2013 - 12:00:05 MDT