lru

A simple O(1) LRU cache

A simple LRU cache supporting O(1) set, get and eviction of old keys

$ npm install lru
var LRU = require('lru').LRU;
 
var cache = new LRU(10);
 
cache.set('foo', bar');
cache.get('foo'); //=> bar