Re: [squid-users] refresh patterns for Caching Media

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 22 May 2010 02:26:27 +1200

Jumping Mouse wrote:
>
> ----------------------------------------
>> From: kafriki_at_hotmail.com
>> To: squid-users_at_squid-cache.org
>> Date: Wed, 19 May 2010 18:35:44 +0200
>> Subject: [squid-users] refresh patterns for Caching Media
>>
>>
>> Hello eveyone,
>> We are using Squid 2.7 for caching educational media files. We are only using the cache for users who need to access these files. For other internet traffic the cache will be bypassed.
>> The media files will not be changed for at least a year at which point I will run a script to pre-load the cache with the new media files.
>>
>> 1. How can I set the refresh pattern to never refresh these media files? The files are swf (flash) flv, and mp3, etc.
>> This is what I currently have for media:
>>
>> refresh_pattern -i \.(iso|avi|wav|mp3|mp4|mpeg|swf|flv|x-flv)$ 43200 90% 432000 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-no-store ignore-private
>>
>> 2. If I have already pre-loaded media files into the cache, will changes to the refresh patterns work retroactively on these files, or will I have to load them into the cache again?
>>
>> Thanks.
>>
>> Kafriki
>>
>
>
> does anyone have any suggestions or recommendations that they can share with me on this?

Sorry, my first reply seems to have gone astray completely.

re: 1) the pattern and rules you have are about as good as you can get
in squid. The core design of Squid caching is to provide up-to-date
copies rather than archiving stale/obsolete garbage.

A better way to do this for such long times would probably be to
download the data into local directories and setup your own local web
server for them. Squid can be configured to fetch listed URLS from a
specific cache_peer source without keeping its own duplicate copies
(proxy-only option) or going to an external source (never_direct).

Then you would have zero worries about loosing things out of the cache.

re: 2) yes they work at the point of re-request or garbage collection
(which also happens on startup/reconfigure). so retroactive on whatever
is in the cache then.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.3
Received on Fri May 21 2010 - 14:26:39 MDT

This archive was generated by hypermail 2.2.0 : Fri May 21 2010 - 12:00:05 MDT