1.2.12 • Published 7 years ago

keyv-sqlite-shrink v1.2.12

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

keyv-sqlite-shrink

Fork of the SQLite storage adapter for Keyv that supports removing expired data.

Install

npm install --save keyv keyv-sqlite-shrink

Usage

const Keyv = require('keyv');
const KeyvSqliteAdapter = require('keyv-sqlite-shrink');

const storage = new KeyvSqliteAdapter({
  uri: 'sqlite://path/to/database.sqlite',
  table: 'myappcache',
  busyTimeout: 10000
});

const keyv = new Keyv({
  store: storage,
  namespace: 'myapp'
});

keyv.on('error', handleConnectionError);

About the busyTimeout option: read.

License

MIT © MySidesTheyAreGone

MIT © Luke Childs