Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 849 Bytes

README.md

File metadata and controls

38 lines (25 loc) · 849 Bytes

keyv-sqlite-shrink keyv

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