@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 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 Promise.all(keys.map(async key => {
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
  * 清空全部缓存。
@@ -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<any>;
97
+ remove<K extends TKeyPath>(...keys: K[]): Promise<number>;
98
98
  /**
99
99
  * 清空全部缓存。
100
100
  */
@@ -172,10 +172,7 @@ export class CacheService {
172
172
 
173
173
 
174
174
  async remove(...keys) {
175
- return Promise.all(keys.map(async key => {
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
  * 清空全部缓存。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "1.27.3",
3
+ "version": "1.27.4",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",