Re: [squid-users] refresh patterns!

From: Adrian Chadd <adrian@dont-contact.us>
Date: Mon, 13 Aug 2007 22:49:24 +0800

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
Received on Mon Aug 13 2007 - 08:48:15 MDT

This archive was generated by hypermail pre-2.1.9 : Sat Sep 01 2007 - 12:00:03 MDT