Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
kayv-ttl
Timeout cache on top of kayv
var kayv = require('kayv');
var db = kayv('prefix');
// items we `set` into the db will expire after 1000 ms (`ttl`)
db = ttl(db, {
ttl: 1000
});
api
ttl(db, opt)
dbshould be an instance ofDbreturned by a call tokayvoptis a plain js object described below
Options
ttltimeout in milliseconds before item is considered stale