Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 31d58e5e55
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (15 sloc) 0.362 kb

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

Installation

$ npm install lru

Usage

var LRU = require('lru').LRU;

var cache = new LRU(10);

cache.set('foo', 'bar');
cache.get('foo'); //=> bar

Credits

A big thanks to Dusty Leary who finished the library.

Jump to Line
Something went wrong with that request. Please try again.