after read manual configuration about caching dynamic content on squid now i’l try share about caching dynamic content. for example we will make video cache from youtube. after read about that in squid-cache.org we will find configuration config example. default configuration about dinamyc content on squid configuration store in
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
for changed policy remove the QUERY ACL will paired and replace by refesh apttern below:
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
now we try caching youtube video. store configuration below to your squid configuration
# REMOVE these lines from squid.conf
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
refresh_pattern -i \.flv$ 10080 90% 999999 ignore-no-cache override-expire ignore-private
quick_abort_min -1 KB
maximum_object_size 4 GB
acl youtube dstdomain .youtube.com
cache allow youtube
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 0% 4320
and try to access video from youtube and what we will see that video will cache with our configuration.Now that you’ve added your blog, we need to make sure that you own this blog.
note : default configuration on squid prevent dynamic content and youtube content. and specialy implemented on several feature from flash video format. and for more detail read artikel
source : squid-cache.org