@resolid/cache-manager-sqlite
TypeScript icon, indicating that this package has built-in type declarations

5.1.5 • Public • Published

SQLite store for cache manager

A new SQLite cache store for cache-manager.

Featuring:

  • using better-sqlite3
  • 100% test coverage and production ready
  • Optimized mset/mget support
  • ESM only

Installation

npm i @resolid/cache-manager-sqlite

Requirements

Usage

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 caches table
const sqliteStoreCache = cacheManager.caching(sqliteStore({sqliteFile: join(process.cwd(), 'cache.sqlite3'), cacheTableName: 'caches'}))

License

MIT.

Thanks

Thanks to JetBrains for the OSS development license.

JetBrain

Package Sidebar

Install

npm i @resolid/cache-manager-sqlite

Weekly Downloads

136

Version

5.1.5

License

MIT

Unpacked Size

9.75 kB

Total Files

7

Last publish

Collaborators

  • huijiewei