Professional Documents
Culture Documents
Puas rasanya, akhirnya bisa caching youtube (dan yang similar) :D.
Setelah sekian bulan “mangkrak” akhirnya jalan juga walau masih di mesin virtualbox.
Versi yang saya pakai adalah squid-2.7.STABLE3, tidak tahu dukungan untuk versi yang
lain.
Hasilnya bisa dilihat di access-log, pada saat mengakses video yang sama, akan langsung
hit.
Satu pesan dari Horacio Herrera Gonzalez, karena basic scriptnya tidak spesifik ke url
tertentu, maka :
Warning! This code may match other sites not related to YT or GV.
Caching photobucket
di store_url_rewrite
$url
=~s@^http://(.*?)/albums\?&.*@squid://images.photobucket.INTERNAL/ID=$3
@;
$url
=~s@^http://(.*?)/albums\?$@squid://images.photobucket.INTERNAL/ID=$3@;
$url
=~s@^http://(.*?)/albums\?&.*@squid://videos.photobucket.INTERNAL/ID=$3
@;
$url
=~s@^http://(.*?)/albums\?$@squid://videos.photobucket.INTERNAL/ID=$3@;
di squid.conf
refresh_pattern
^http://i(.*?).photobucket.com/albums/(.*?)/(.*?)/(.*?)\? 43200 90%
999999 override-expire ignore-no-cache ignore-private
refresh_pattern ^http://vid(.*?).photobucket.com/albums/(.*?)/(.*?)\?
43200 90% 999999 override-expire ignore-no-cache ignore-private
Hasilnya
Satu pesan dari Horacio Herrera Gonzalez, karena basic scriptnya tidak spesifik ke url
tertentu, maka :
Warning! This code may match other sites not related to YT or GV.
Caching photobucket
di store_url_rewrite
$url
=~s@^http://(.*?)/albums\?&.*@squid://images.photobucket.INTERNAL/ID=$3
@;
$url
=~s@^http://(.*?)/albums\?$@squid://images.photobucket.INTERNAL/ID=$3@;
$url
=~s@^http://(.*?)/albums\?&.*@squid://videos.photobucket.INTERNAL/ID=$3
@;
$url
=~s@^http://(.*?)/albums\?$@squid://videos.photobucket.INTERNAL/ID=$3@;
di squid.conf
refresh_pattern
^http://i(.*?).photobucket.com/albums/(.*?)/(.*?)/(.*?)\? 43200 90%
999999 override-expire ignore-no-cache ignore-private
refresh_pattern ^http://vid(.*?).photobucket.com/albums/(.*?)/(.*?)\?
43200 90% 999999 override-expire ignore-no-cache ignore-private
Hasilnya