Search squid archive

Re: refresh patterns!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Of course, it works for me, in my very uncontrolled test:

1187016079.685  65938 192.168.1.140 TCP_MISS/200 2679416 GET http://ash-v287.ash.youtube.com/get_video?video_id=HR-JFOWpsNM - DIRECT/64.15.126.164 video/flv

Then in store.log:

1187016079.682 SWAPOUT 00 00000D09 C6F49515BDA7D2CC7C82C800395B14A6  200 1187016014 1186779011        -1 video/flv 2679076/2679076 GET http://ash-v287.ash.youtube.com/get_video?video_id=HR-JFOWpsNM

Ok, so it was swapped out; then I clear cache and jump back in:

1187016153.202   3249 192.168.1.140 TCP_HIT/200 2679425 GET http://ash-v287.ash.youtube.com/get_video?video_id=HR-JFOWpsNM - NONE/- video/flv

Yum!

(Of course there's more to caching youtube - specifically, would need to
implement a patch to squid to create a URI from that youtube URL which
creates the same "host" part regardless of which bit of the CDN you fetch
it from - using that URL for the cache storage and lookup. That'd be a
pretty nifty start.)

relevant bits in my Squid config:

# Cache dynamic content from youtube/etc
# Let the clients favourite video site through
acl youtube dstdomain .youtube.com
cache allow youtube

# NOW stop any other dynamic stuff being cached
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY

refresh_pattern -i \.flv$       10080   90%     999999 reload-into-ims

maximum_object_size 32 MB
maximum_object_size_in_memory 512 KB

So, who wants a t-shirt for implementing the above patch and demonstrating
it works with Youtube? I just don't have the time.



Adrian



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux