Simple ttl cache
npm install @purpose/ttl-cache> in-memory ttl cache. that's it
``sh`
$ npm i @purpose/ttl-cache
`js
import c from '@purpose/ttl-cache';
const cache = c();
cache.set('foo', 'bar');
console.log(cache.get('foo'));
`
create cache that keep items for opts.ttl || 300000 ms, and does cleanupopts.interval || 60000` ms.
every
get item by key, or null if expired or missing
set item by key
get current cache size (might contain expired items too)
MIT