title: Looking for a FIFO/LRU file storage system
body: <p>I'm looking to implement a disk based caching system. The idea is to allocate a certain amount of disk space and save however much data fits in there, discarding of old files as I run out of space.</p>
  
  <p>LRU is my first choice of deletion strategy, but I'm willing to settle for FIFO. When googling for cache algorithms, the discussion seems to be dominated by memory-based caching. <a href="http://memcached.org/" rel="nofollow noreferrer">Memcached</a>, for example, would be exactly what I'm looking for, except that it's memory based. On the other hand, solutions like Memcachedb, couchdb etc. don't seem to have LRU capabilities.</p>
  
  <p>The closest thing I've found is the <a href="http://www.squid-cache.org/" rel="nofollow noreferrer">squid proxy</a> server storage systems. <a href="http://devel.squid-cache.org/coss/coss-notes.txt" rel="nofollow noreferrer">COSS</a> seems to be the most documented one, but to use it I would probably have to rewrite it as a stand-alone process (or library).</p>
  
  <p>What project or (java/python) library can I use for such a thing?</p>
  
  <p><strong>EDIT:</strong> found this <a href="https://stackoverflow.com/questions/1316852/alternative-to-memcached-that-can-persist-to-disk">related question</a>.</p>