tiny-fifo-cache
v1.0.1
Published
Simple FIFO cache. put and get.
Downloads
6
Readme
Simple FIFO cache. put and get.
Install
$ npm install --save tiny-fifo-cache
Usage
var FIFOCache = require('tiny-fifo-cache');
var maxItems = 100;
var cache = new FIFOCache(maxItems);
cache.put('key', 'value');
cache.get('key'); // returns 'value'
FIFO Eviction Policy
Once the cache reaches its maximum size, the oldest item is removed.
Development
npm install
npm test
License
MIT © Andy Hume