Fork of the SQLite storage adapter for Keyv that supports removing expired data.
npm install --save keyv keyv-sqlite-shrink
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.
MIT © MySidesTheyAreGone
MIT © Luke Childs