@veloxts/cache 0.6.82 → 0.6.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/GUIDE.md +3 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/GUIDE.md
CHANGED
|
@@ -14,10 +14,10 @@ pnpm add ioredis
|
|
|
14
14
|
## Plugin Registration
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
import {
|
|
17
|
+
import { veloxApp } from '@veloxts/core';
|
|
18
18
|
import { cachePlugin } from '@veloxts/cache';
|
|
19
19
|
|
|
20
|
-
const app =
|
|
20
|
+
const app = await veloxApp();
|
|
21
21
|
|
|
22
22
|
// Memory cache (development)
|
|
23
23
|
app.use(cachePlugin({
|
|
@@ -54,7 +54,7 @@ Cache-aside pattern that fetches from cache or computes and stores:
|
|
|
54
54
|
|
|
55
55
|
```typescript
|
|
56
56
|
const user = await ctx.cache.remember('user:123', '1h', async () => {
|
|
57
|
-
return await ctx.db.user.
|
|
57
|
+
return await ctx.db.user.findUniqueOrThrow({ where: { id: '123' } });
|
|
58
58
|
});
|
|
59
59
|
```
|
|
60
60
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veloxts/cache",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.83",
|
|
4
4
|
"description": "Multi-driver caching layer for VeloxTS framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"fastify-plugin": "5.1.0",
|
|
36
36
|
"lru-cache": "11.1.0",
|
|
37
37
|
"superjson": "2.2.2",
|
|
38
|
-
"@veloxts/core": "0.6.
|
|
38
|
+
"@veloxts/core": "0.6.83"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"ioredis": ">=5.0.0"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"ioredis": "5.6.1",
|
|
52
52
|
"typescript": "5.9.3",
|
|
53
53
|
"vitest": "4.0.16",
|
|
54
|
-
"@veloxts/testing": "0.6.
|
|
54
|
+
"@veloxts/testing": "0.6.83"
|
|
55
55
|
},
|
|
56
56
|
"keywords": [
|
|
57
57
|
"velox",
|