🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@resolid/cache-manager-sqlite

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@resolid/cache-manager-sqlite

A new SQLite store for cache-manager

5.1.6
latest
Source
npm
Version published
Weekly downloads
463
20.89%
Maintainers
0
Weekly downloads
 
Created
Source

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 cacheManager,{ createCache } from "cache-manager";
import { join } from 'node:path';

// SQLite :memory: cache store
const memStoreCache = await cacheManager.caching(sqliteStore({cacheTableName: 'caches'}));

// On disk cache on caches table
const sqliteStoreCache = await cacheManager.caching(sqliteStore({sqliteFile: join(process.cwd(), 'cache.sqlite3'), cacheTableName: 'caches'}));

// SQLite :memory: cache store sync version
const memStoreCache = createCache(sqliteStore({cacheTableName: 'caches'}));

// On disk cache on caches table sync version
const sqliteStoreCache = createCache(sqliteStore({sqliteFile: join(process.cwd(), 'cache.sqlite3'), cacheTableName: 'caches'}))

License

MIT.

Thanks

Thanks to JetBrains for the OSS development license.

JetBrain

Keywords

cache-manager

FAQs

Package last updated on 04 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts