Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nxht/cache-manager-bun-sqlite
Node Cache Manager store for Bun SQLite
https://github.com/nxht/cache-manager-bun-sqlite
bun cache-manager sqlite
Last synced: 3 months ago
JSON representation
Node Cache Manager store for Bun SQLite
- Host: GitHub
- URL: https://github.com/nxht/cache-manager-bun-sqlite
- Owner: nxht
- Created: 2024-04-26T14:11:01.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-08-26T13:19:17.000Z (4 months ago)
- Last Synced: 2024-09-26T16:48:30.249Z (3 months ago)
- Topics: bun, cache-manager, sqlite
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/cache-manager-bun-sqlite
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node Cache Manager store for Bun SQLite
[bun:sqlite](https://bun.sh/docs/api/sqlite) store for the [node-cache-manager](https://github.com/BryanDonovan/node-cache-manager)
## Installation
```sh
bun install cache-manager-bun-sqlite
```## Usage Examples
```typescript
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'
```