baru tadi sadar, kalo youtube caching nya gak bisa?gak ada satupun yg hit. :(
coba utak atik, bisa nge cache kembali yg ada di googlevideo.com
quick workaround.

di script perl store_url_rewrite ubah jadi seperti ini:

$url =~s@^http://(.*?)/get_video\?(.*)video_id=(.*?)&.*@squid://videos.youtube.INTERNAL/ID=$3@;
$url =~s@^http://(.*?)/get_video\?(.*)video_id=(.*?)$@squid://videos.youtube.INTERNAL/ID=$3@;
$url =~s@^http://(.*?)/videoplayback\?(.*)id=(.*?)$@squid://videos.google.INTERNAL/ID=$3@;
$url =~s@^http://(.*?)/videoplayback\?(.*)id=(.*?)&.*@squid://videos.google.INTERNAL/ID=$3@;

di squid.conf:

acl store_rewrite_list url_regex ^http://(.*?)/get_video\?
acl store_rewrite_list url_regex ^http://(.*?)/videoplayback\?
refresh_pattern ^http://(.*?)/get_video\? 10080 90% 999999 override-expire ignore-no-cache ignore-private
refresh_pattern ^http://(.*?)/videoplayback\? 10080 90% 999999 override-expire ignore-no-cache ignore-private

saya test bisa meng-cache yg ada di google video

1243017933.687 55980 172.18.1.5 TCP_HIT/200 5007160 GET http://v14.lscache7.googlevideo.com/videoplayback?ip=0.0.0.0&sparams=id,expire,ip,ipbits,itag&itag=34&ipbits=0&sver=3&expire=1243015200&key=yt1&signature=A1743BEF65E797AEF9E5B98998D45E2F7661B41F.55FDA15EF1725A1C0EA18CA9E4C88ED99465529F&id=26cccdee1f384d7b - NONE/- video/x-flv

nb: setelah di pikir2 sepertinya lebih enak pake aplikasi cachevideos, http://cachevideos.com/download. dengan sedikit modifikasi hasil caching nya bisa di share untuk squid proxy yg lain.

Share