Simple FIFO cache. put and get.
npm install tiny-fifo-cache> Simple FIFO cache. put and get.
``sh`
$ npm install --save tiny-fifo-cache
`js
var FIFOCache = require('tiny-fifo-cache');
var maxItems = 100;
var cache = new FIFOCache(maxItems);
cache.put('key', 'value');
cache.get('key'); // returns 'value'
`
Once the cache reaches its maximum size, the oldest item is removed.
`sh``
npm install
npm test
MIT © Andy Hume
[npm-image]: https://badge.fury.io/js/tiny-fifo-cache.svg
[npm-url]: https://npmjs.org/package/tiny-fifo-cache
[travis-image]: https://travis-ci.org/ahume/tiny-fifo-cache.svg?branch=master
[travis-url]: https://travis-ci.org/ahume/tiny-fifo-cache
[daviddm-image]: https://david-dm.org/ahume/tiny-fifo-cache.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/ahume/tiny-fifo-cache