A new SQLite cache store for cache-manager.
- using better-sqlite3
- 100% test coverage and production ready
- Optimized
mset
/mget
support - ESM only
npm i @resolid/cache-manager-sqlite
- SQLite 3 with better-sqlite3
- Node 18+
import {sqliteStore} from '@resolid/cache-manager-sqlite';
import {createCache} from 'cache-manager';
import {join} from 'node:path';
// SQLite :memory: cache store
const memStoreCache = cacheManager.caching(sqliteStore({cacheTableName: 'caches'}));
// On disk cache on employees table
const sqliteStoreCache = cacheManager.caching(sqliteStore({sqliteFile: join(process.cwd(), 'cache.sqlite3'), cacheTableName: 'caches'}))
MIT.
Thanks to JetBrains for the OSS development license.