1.0.0 • Published 4 years ago

cachenator v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

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