lru-diskcache
A disk cache object that deletes the least-recently-used items. Based on lru-cache.
Usage
var LRU = var cache = ; cache cachecache // Buffer("A string content") // with a buffer or streamcachecache cache // empty the cache
If you put more stuff in it, then items will fall out.
If you try to put an oversized thing in it, then it'll fall out right away.
API
// Initialize the cachecache // Get content as a buffer (return a promise)cache // Get content as a stringcache // Get content as a stream (return a promise)cache // Check if a key is in the cache, without updating the recent-ness or deleting it for being stale.cache // Delete a key from the cachecache // Return total length of objects in cache taking into accountcachesize // Manually iterates over the entire cache proactively pruning old entriescache