SQLite store for node cache manager
A modern SQlite cache store for node-cache-manager. Featuring:
- Async SQLite3 using sqlite3
async
/await
support with Promise- 100% test coverage and production ready
- Smart purging support
Installation
npm i cache-manager-sqlite
Requirements
Usage
const sqliteStore = require('cache-manager-sqlite')
const cacheManager = require('cache-manager')
const memStoreCache = cacheManager.caching({
store: sqliteStore
})
const cache = cacheManager.caching({
store: sqliteStore,
name: 'employees',
path: '/tmp/cache.db'
})
await cache.set('foo', {test: 'bar'}, {ttl: 10000})
const valu = await cache.get('foo')
License
The node-cache-manager-sqlite
is licensed under the MIT license.