# kayv-ttl

> ttl layer for kayv storage

Latest version **1.0.0** (published 2014-02-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install kayv-ttl
pnpm add kayv-ttl
yarn add kayv-ttl
bun add kayv-ttl
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-02-16 |
| First published | 2014-02-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Roman Shtylman |
| Maintainers | shtylman |
| Keywords | localstorage, offline |

## Links

- npm: https://www.npmjs.com/package/kayv-ttl
- Repository: https://github.com/courseoff/kayv-ttl
- Issues: https://github.com/courseoff/kayv-ttl/issues
- npm.io page: https://npm.io/package/kayv-ttl

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2014-02-16

## README

# kayv-ttl

Timeout cache on top of kayv

```js
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

---
_Source: https://npm.io/package/kayv-ttl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
