@jayfong/x-server 1.27.3 → 1.27.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/CHANGELOG.md +7 -0
- package/lib/_cjs/services/cache.js +1 -4
- package/lib/services/cache.d.ts +1 -1
- package/lib/services/cache.js +1 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.27.4](https://github.com/jfWorks/x-server/compare/v1.27.3...v1.27.4) (2022-05-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* cache remove use batch ([1075902](https://github.com/jfWorks/x-server/commit/1075902984e09e766ec72b0289c4e4a5d16d5d16))
|
|
11
|
+
|
|
5
12
|
### [1.27.3](https://github.com/jfWorks/x-server/compare/v1.27.2...v1.27.3) (2022-05-11)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -182,10 +182,7 @@ class CacheService {
|
|
|
182
182
|
|
|
183
183
|
|
|
184
184
|
async remove(...keys) {
|
|
185
|
-
return
|
|
186
|
-
const redisKey = this.toRedisKey(key);
|
|
187
|
-
return _x.x.redis.del(redisKey);
|
|
188
|
-
}));
|
|
185
|
+
return _x.x.redis.del(...keys.map(key => this.toRedisKey(key)));
|
|
189
186
|
}
|
|
190
187
|
/**
|
|
191
188
|
* 清空全部缓存。
|
package/lib/services/cache.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ export declare class CacheService<TData extends Data = Data, TKey extends Key<TD
|
|
|
94
94
|
*
|
|
95
95
|
* @param keys 键列表
|
|
96
96
|
*/
|
|
97
|
-
remove<K extends TKeyPath>(...keys: K[]): Promise<
|
|
97
|
+
remove<K extends TKeyPath>(...keys: K[]): Promise<number>;
|
|
98
98
|
/**
|
|
99
99
|
* 清空全部缓存。
|
|
100
100
|
*/
|
package/lib/services/cache.js
CHANGED
|
@@ -172,10 +172,7 @@ export class CacheService {
|
|
|
172
172
|
|
|
173
173
|
|
|
174
174
|
async remove(...keys) {
|
|
175
|
-
return
|
|
176
|
-
const redisKey = this.toRedisKey(key);
|
|
177
|
-
return x.redis.del(redisKey);
|
|
178
|
-
}));
|
|
175
|
+
return x.redis.del(...keys.map(key => this.toRedisKey(key)));
|
|
179
176
|
}
|
|
180
177
|
/**
|
|
181
178
|
* 清空全部缓存。
|