This package has been deprecated

Author message:

dead package

keyv-mysql-shrink

1.1.3 • Public • Published

keyv-mysql-shrink keyv

Fork of the MySQL/MariaDB storage adapter for Keyv. Supports removing expired data via a shrink function.

Install

npm install --save keyv keyv-mysql-shrink

Usage

const Keyv = require('keyv');
const KeyvStorageAdapter = require('keyv-mysql-shrink');

const storage = new KeyvStorageAdapter({
  uri: 'mysql://user:pass@localhost:3306/dbname',
  table: 'myappcache',
  keySize: 255 // this is the default
});

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

keyv.on('error', handleConnectionError);

Note: Some MySQL/MariaDB installations won't allow a key size longer than 767 bytes. If you get an error on table creation try reducing keySize to 191 or lower. #5

License

MIT © MySidesTheyAreGone

MIT © Luke Childs

Package Sidebar

Install

npm i keyv-mysql-shrink

Weekly Downloads

3

Version

1.1.3

License

MIT

Last publish

Collaborators

  • mysidestheyaregone