bun:sqlite store for the node-cache-manager
bun install cache-manager-bun-sqlite
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'