lruly
Implements an LRU cache.
var lruly = ; var cache = ;cache;
Installation
$ npm install -g lruly $ component install cfddream/lruly
Quick Start
Create the LRU cache and set maxEntries
,
if maxEntries
is zero, the cache has no limit:
var cache = ;
Add a entiry:
cache;
Get the entry's value:
cache; // { version: '0.0.1', name: 'lruly' }
Remove the entry by key:
cache; cache;
Get the number of entries in the cache:
cache;
Clean the cache:
cache;
Running Tests
To run the test suite first invoke the following command within the repo, installing the development dependencies:
$ npm install
then run the tests:
$ make test