cachenator
v1.0.0
Published
Store data in key value with configurable expiry time.
Downloads
1
Maintainers
Readme
Cachenator
Store data in key value with configurable expiry time.
Install
$ npm install cachenator
Usage
import Cachenator from 'cachenator';
const store = new Cachenator('animals');
store.set('dog', 🐶); // Default is one day
store.get('dog');
//=> 🐶
// Wait for 1 day...
store.get('dog');
//=> null
store.set('cat', 🐱, 1000);
store.get('cat');
//=> 🐱
// Wait for 1 second...
store.get('cat');
//=> null
License
MIT © Christopher Ribeiro