开发者社区> 镜像站> NPM> kayv-ttl
kayv-ttl
ttl layer for kayv storage
Last updated 7 years ago by shtylman .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install kayv-ttl 
SYNC missed versions from official npm registry.

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)

  • db should be an instance of Db returned by a call to kayv
  • opt is a plain js object described below

Options

  • ttl timeout in milliseconds before item is considered stale

Current Tags

  • 1.0.0                                ...           latest (7 years ago)

1 Versions

  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (0)
None