Videocache is no longer in development.

Storing video data longer

by Anonymous on 21 Nov 2008

Is there a way to set squid to cache videos for a longer period of time than other cached data?

I'd like to keep the videos for a week or so but trash the web cache after 12 hours.

5 Answers

by Kulbir Saini on 21 Nov 2008

No. Squid can't distinguish like this. Videos cached using youtube cache are kept in the cache forever unless you choose to delete them.

The only way to do this is using refresh_pattern directive in squid. But that is complex and you may end up screwing your web experience by browsing the stale content.

by josgan on 21 Nov 2008

Is there a way to cluster two squid caches together and have one handle video and another handle web cache?

by Kulbir Saini on 21 Nov 2008

You don't really need to cluster caches. You can use two squid in cascading mode. For example, let us say you have two squid machine A and B.

Squid A is your main proxy server to which all your clients connect. You configure squid A to cache all web content and not media content like flv, avi etc. using cache_deny and acl directives provided by squid.

Squid B is your another proxy server which doesn't cache anything from web content. Here you cache only media content like flv, avi, mpg etc. using cache_deny and acl directives.

Now, you cascade squid A to B based on domains. You need to look at cache_peer, cache_peer_domain, cache_peer_access, never_direct and prefer_direct directives provided by squid. The idea you are trying to achieve is possible. In case you need any assistant regarding exact configurations contact me using contact tab on the top.

by Anonymous on 8 Dec 2008

I need a setup exactly as you describe. However, is it possible to configure 2 squid proxy’s on same server and still work with the cache videos plugin?

by Kulbir Saini on 8 Dec 2008

Yes. It is possible. But they should be running on different ports.