@autofleet/matmon 2.2.2-beta.1 → 2.2.2-beta.2

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.
@@ -13,6 +13,7 @@ declare class RedisCache {
13
13
  set(key: any, value: any): Promise<void>;
14
14
  remove(key: any): Promise<void>;
15
15
  removeMultiple(keys: any): Promise<void>;
16
+ flushAll(): Promise<void>;
16
17
  getClient(): any;
17
18
  private lock;
18
19
  }
@@ -109,6 +109,14 @@ class RedisCache {
109
109
  throw new errors_1.RedisCacheError(`Failed to delete multiple keys ${keysWithPrefix.join('|')}`, err);
110
110
  }
111
111
  }
112
+ async flushAll() {
113
+ try {
114
+ await this.client.flushAll();
115
+ }
116
+ catch (err) {
117
+ throw new errors_1.RedisCacheError(`Failed to flush all keys`, err);
118
+ }
119
+ }
112
120
  getClient() {
113
121
  return this.client;
114
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/matmon",
3
- "version": "2.2.2-beta.1",
3
+ "version": "2.2.2-beta.2",
4
4
  "description": "manage cache",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "bluebird": "^3.7.2",
34
34
  "dotenv": "^8.2.0",
35
35
  "lru-cache": "^6.0.0",
36
- "redis": "4.6.7",
36
+ "redis": "^3.0.2",
37
37
  "redis-lock": "^0.1.4",
38
38
  "sequelize": "^6.6.2",
39
39
  "sequelize-typescript": "^2.1.0"