@hile/cache 2.0.3 → 2.0.4
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/dist/define.d.ts +1 -0
- package/dist/define.js +1 -0
- package/dist/index.js +1 -2
- package/package.json +2 -2
package/dist/define.d.ts
CHANGED
package/dist/define.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Cache } from './define.js';
|
|
2
1
|
export * from './define.js';
|
|
3
2
|
export class RedisCache {
|
|
4
3
|
prefix;
|
|
@@ -14,7 +13,7 @@ export class RedisCache {
|
|
|
14
13
|
async _write(target, params) {
|
|
15
14
|
const key = this.makeKey(target.key, params);
|
|
16
15
|
const cache = await target.fn(params);
|
|
17
|
-
if (
|
|
16
|
+
if (cache.__$flag__ !== 'cache') {
|
|
18
17
|
throw new Error('Cache result must be an instance of Cache');
|
|
19
18
|
}
|
|
20
19
|
const redis = this.redis;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hile/cache",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"ioredis": "^5.11.0"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "2d8091212ef354336c03e346d6fd49b6b335a780"
|
|
27
27
|
}
|