Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 615 Bytes

README.md

File metadata and controls

29 lines (21 loc) · 615 Bytes

Node Cache Manager store for Bun SQLite

bun:sqlite store for the node-cache-manager

Installation

bun install cache-manager-bun-sqlite

Usage Examples

import { caching } from 'cache-manager';
import { BunSqliteStore } from 'cache-manager-bun-sqlite';

const cache = caching(
  BunSqliteStore({
    name: 'test',
    path: ':memory:',
    ttl: 10, // in ms,
    purgeInterval: 5 * 60 * 1000, // in ms
  }),
);

await cache.set('foo', 'bar');
console.log(await cache.get('foo')); // 'bar'