cacherrr
v0.4.0
Published
simple caching for the browser
Downloads
5
Readme
cacherrr
simple caching for the browser
Install
npm install cacherrr
Example Setup
Javascript
import Cacherrr from 'cacherrr';
// create an instance
const cacherrr = new Cacherrr();
// set cached data for path
cacherrr.set('/path', {key: 'value'})
.then(data => {console.log(data);})
.catch(e => {console.error(e);});
// get cached data for path
cacherrr.get('/path')
.then(data => {console.log(data);})
.catch(e => {console.error(e);});
// clear cache for path
cacherrr.clear('/path');
// clear entire cache
cacherrr.clearAll();