Re: [squid-users] Re: Help Squid 3.4.0.2 ytimg

From: Eliezer Croitoru <eliezer_at_ngtech.co.il>
Date: Sat, 12 Oct 2013 23:33:21 +0300

Hey,

I reviewed your squid.conf..
And I am not sure what you are expecting yet..
run the command:
http_proxy=http://127.0.0.1:3128/ curl -I
http://i1.ytimg.com/vi/NlmezywdxPI/default.jpg

Try these settings:
##start
cache_dir ufs /usr/local/squid/var/cache/squid 1000 16 256
cache_dir rock /usr/local/squid/var/cache/rock 1000 min-size=0
max-size=32000

maximum_object_size_in_memory 20 MB
maximum_object_size 1024 MB
minimum_object_size 0 b
refresh_pattern ^http://.*\.ytimg\.com\/.*\.jpg 1440 100% 10080
override-expire

acl rewritedoms dstdomain .dailymotion.com .video-http.media-imdb.com
.c.youtube.com av.vimeo.com .dl.sourceforge.net .ytimg.com
.vid.ec.dmcdn.net .videoslasher.com

acl ytcblockdoms dstdomain redirector.c.youtube.com
acl redirect urlpath_regex redirect
acl ytcdoms dstdomain .c.youtube.com

store_id_program /usr/local/squid/libexec/storeid_file_rewrite
/usr/local/squid/etc/cleaned_db_file
store_id_children 40 startup=10 idle=5 concurrency=0
store_id_access deny ytcdoms redirect
store_id_access allow rewritedoms
store_id_access deny all
##end

which gives a clean:
1381609560.752 0 127.0.0.1 TCP_MEM_HIT/200 402 HEAD
http://i1.ytimg.com/vi/NlmezywdxPI/default.jpg - HIER_NONE/- image/jpeg

So I assume that when youtube allow the bowser to cache it means that a
refresh like this:

1381609767.404 72 84.95.212.160 TCP_REFRESH_MODIFIED/200 2713 GET
http://i1.ytimg.com/vi/NlmezywdxPI/default.jpg - HIER_DIRECT/62.0.54.118
image/jpeg
1381609785.618 3 84.95.212.160 TCP_REFRESH_UNMODIFIED/304 217 GET
http://i1.ytimg.com/vi/NlmezywdxPI/default.jpg - HIER_DIRECT/62.0.54.118 -

Should be possible.
In a case you know that a X or Y url should be kind of "stale" I would
try to use ICAP to alter the responses and make sure that the client
gets a stale object.
Squid tries to not get into a situation that a stale object will be
served to the client.

Eliezer

On 10/12/2013 09:43 AM, calode wrote:
> I was having trouble with my other User calodo , so I created a new one ...
>
> my whole conf file is attached , thks for the help Amos .
>
> squid34.conf
> <http://squid-web-proxy-cache.1019090.n4.nabble.com/file/n4662603/squid34.conf>
>
>
>
> --
> View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Help-Squid-3-4-0-2-ytimg-tp4662579p4662603.html
> Sent from the Squid - Users mailing list archive at Nabble.com.
>
Received on Sat Oct 12 2013 - 20:33:33 MDT

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