$ npm install cacha
Cache on file-system
$ npm install --save cacha
const Cache = require('cacha');
const cache = new Cacha('.my/cache');
cache.set('id', 'content');
//=> Promise
cache.get('id');
//=> Promise with 'content'
Type: string
Directory in HOME or TMP directory of current user.
If namespace begins with /
it will be interpreted as absolute path.
Type: Number
Default: 86400000
How long (in milliseconds) keep entries in cache.
Get and set methods for cache entries. options
are passed to fs
write and read methods (for example to specify encoding).
Removes outdated entries in cache.
MIT © Vsevolod Strukchinsky
© 2010 - cnpmjs.org x YWFE | Home | YWFE