File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 77## Installation
88
99```
10- npm i cache-manager-bun-sqlite
10+ bun add cache-manager-bun-sqlite3
1111```
1212
1313## Usage
1414
1515### Single store
1616
1717``` ts
18- import
1918import cacheManager from ' cache-manager' ;
20- import bunSqliteStore from ' cache-manager-bun-sqlite ' ;
19+ import bunSqliteStore from ' cache-manager-bun-sqlite3 ' ;
2120
2221// SQLite :memory: cache store
2322cache = await cacheManager .caching (bunSqliteStore , {
24- serializer: ' json' , // default is 'cbor'
25- ttl: 20 , // TTL in seconds
23+ serializer: ' json' , // default is 'cbor'
24+ ttl: 20 , // TTL in seconds
2625});
2726
2827// On-disk cache on employees table
@@ -44,7 +43,7 @@ const value = await cache.get('foo');
4443
4544``` ts
4645import cacheManager from ' cache-manager' ;
47- import bunSqliteStore from ' cache-manager-bun-sqlite ' ;
46+ import bunSqliteStore from ' cache-manager-bun-sqlite3 ' ;
4847import redisStore from ' cache-manager-ioredis' ;
4948
5049const redisCache = await cacheManager .caching ({ store: redisStore , db: 0 , ttl: 600 });
Original file line number Diff line number Diff line change 11{
2- "name" : " cache-manager-bun-sqlite " ,
2+ "name" : " cache-manager-bun-sqlite3 " ,
33 "version" : " 0.1.0" ,
44 "description" : " Bun sqlite store for node-cache-manager" ,
55 "type" : " module" ,
You can’t perform that action at this time.
0 commit comments