cachenator

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i cachenator

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.32 kB

Total Files

5

Last publish

Collaborators

  • christopy