On Mon, 13 Aug 2007, Amos Jeffries wrote:
Haven't had luck with those media files. they just don't seem to be
cached. I tried few suggestions on this list but didn't help. It'd be
really nice if someone could provide working rules to cache those
flash media from youtube, googlevideos etc...
I wrote this into the wiki recently to cover the youtube case. Results
with the other sites vary.
http://wiki.squid-cache.org/ConfigExamples/DynamicContent
I've put up the acl for them and yet everything else gets a hit except the
flash media itself.
config :
# TAG: Caching Dynamic Contents
acl youtube dstdomain .youtube.com
acl googlevideo dstdomain .google.com .googlevideo.com
cache allow youtube
cache allow googlevideo
# TAG: hierarchy_stoplist
# A list of words which, if found in a URL, cause the object to
# be handled directly by this cache. In other words, use this
# to not query neighbor caches for certain objects. You may
# list this option multiple times. Note: never_direct overrides
# this option.
#We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?
# TAG: cache
# A list of ACL elements which, if matched, cause the request to
# not be satisfied from the cache and the reply to not be cached.
# In other words, use this to force certain objects to never be
cached.
#
# You must use the word 'DENY' to indicate the ACL names which
should
# NOT be cached.
#
# Default is to allow all to be cached
#We recommend you to use the following two lines.
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
#cache deny QUERY
access.log on second viewing of same media url :
1186993611.227 1 202.51.76.26 TCP_HIT/200 1726 GET
http://youtube.com/img/pic_globalnav_gradation_875x36.png - NONE/-
image/png
1186993611.385 276 202.51.76.26 TCP_HIT/200 27220 GET
http://youtube.com/img/btn_gradient_orange_1x23.png - NONE/- image/png
1186993612.377 1333 202.51.76.26 TCP_MISS/302 181 GET
http://cache.googlevideo.com/get_video? - DIRECT/74.125.15.28 -
1186993618.794 667 202.51.76.26 TCP_MISS/200 431 GET
http://video.google.com/s? - DIRECT/209.85.169.99 text/html
If anyone can provide a list (even partial) of other common sites that it
works for please let us know so I we update the wiki.
Amos
Manoj
--