Caching media files

Some thoughts about caching.

You could turn all the MP3 links on a page into cache links using a bookmarklet:
freecache

or a rule for PithHelmet's Transmogrifier (Safari only):


<dict>
    <key>FactoryRule</key>
    <true/>
    <key>MatchPattern</key>
    <string>^(.*\.mp3)$</string>
    <key>ReplacementString</key>
    <string>http://www.freecache.org/$1</string>
    <key>RuleType</key>
    <string>regex_replace</string>
    <key>SubresourceRule</key>
    <false/>
</dict>

but FreeCache isn't really supposed to be used for smallish files like single music tracks.

Instead, you might want to run a proxy server locally that would be used not for normal web browsing, but for RealPlayer, QuickTime, and any MP3 links (by replacing 'http://www.freecache.org/' in the examples above with 'http://127.0.0.1:6666/' - 6666 being whatever port number your proxy server is listening on).

Something like Squid might be too hefty for this - a simple Perl script would probably suffice. It would be nice if it could hook into the mldonkey daemon to search other networks (and make cached files available) too.