On 22/04/2014 2:51 a.m., Joshua B. wrote: > I've been thinking lately. Would it be possible to ensure the 100% > cacheability of video content? By configuring Squid in a certain > way. It is not possible to ensure 100% caching of anything. The URL you present below already goes as far as it can to do so. * Allowing caching and leaving the duration of caching up to the proxy, * Providing Range support for viewers skipping forward/back in the video, * Providing Last-Modified and ETag for the base video object to minimize bandwidth when proxies need to check freshness of their cached content. [except you override those in your refresh_patterns...] > So, for example. I could have Squid cache this: 1398090836.712 6635 > 10.0.11.2 TCP_MISS/200 2030510 GET > http://s5.videofun.me/videos/ongoing/naruto_shippuuden_-_360pv.mp4?gtw=1&st=m9nTi2Fx1pZ9OguDwrAhVw&e=1398098043&server=videofun > - HIER_DIRECT/198.105.219.156 video/mp4 > > Completely regardless of the ? and everything after it. So the video > content is cached, no matter what. I personally believe this could be > a huge bandwidth saver, especially if there's people on your network > who watch a lot of anime online. I've been struggling lately to get > content with a ? in it to cache. Even if it may appear to be dynamic, > the same content is really the same, regardless how much the rest of > the url changes. StoreID feature from Squid-3.4 is what you can use to de-duplicate the URLs in cache. The server for that URL provides a working ETag and Last-Modfied which will assist in ensuring accuracy of the delivered objects. If the ETag changes between checks with the origin server then its *not* the same video. You will want to remove the override-lastmod option from your refresh_pattern(s) so that object revalidation works properly. > > So my question is, is there any possibility to ensure that such > content (with a ? in the url) gets cached, no matter what? I have no > concerns over the proxies disk space being used for this, as that is > exactly what I want. I want the content to be cached, and stored for > at least 1 week (if possible, and if it's not viewed again) before > expiring it. My Squid version is: 3.3.1 Cache is a temporary storage, an optimization in the delivery pathway, not an archive. Amos