0.0.8 • Published 12 years ago

lruly v0.0.8

Weekly downloads
4
License
-
Repository
github
Last release
12 years ago

lruly

Implements an LRU cache.

var lruly = require('lruly');

var cache = lruly();
cache.add('foo', 'hello world');

Installation

$ npm install -g lruly

Quick Start

Create the LRU cache and set maxEntries, if maxEntries is zero, the cache has no limit:

var cache = lruly(8964);

Add a entiry:

cache.add('module', { version: '0.0.1', name: 'lruly' });

Get the entry's value:

cache.get('module'); // { version: '0.0.1', name: 'lruly' }

Remove the entiry by key:

cache.remove('module');

Get the number of entries in the cache:

cache.len();
0.0.8

12 years ago

0.0.7

12 years ago

0.0.6

12 years ago

0.0.5

12 years ago

0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago