|
@ -30,7 +30,6 @@ export class RedisCacheService { |
|
|
|
|
|
|
|
|
this.cache.stores[0].deserialize = (value) => { |
|
|
this.cache.stores[0].deserialize = (value) => { |
|
|
try { |
|
|
try { |
|
|
|
|
|
|
|
|
return JSON.parse(value); |
|
|
return JSON.parse(value); |
|
|
} catch (error: any) { |
|
|
} catch (error: any) { |
|
|
if (error instanceof SyntaxError) { |
|
|
if (error instanceof SyntaxError) { |
|
@ -41,11 +40,10 @@ export class RedisCacheService { |
|
|
|
|
|
|
|
|
return value; |
|
|
return value; |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
|
|
|
throw error; |
|
|
throw error; |
|
|
} |
|
|
} |
|
|
}; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
for await (const [key] of this.cache.stores[0].iterator({})) { |
|
|
for await (const [key] of this.cache.stores[0].iterator({})) { |
|
|
if ((prefix && key.startsWith(prefix)) || !prefix) { |
|
|
if ((prefix && key.startsWith(prefix)) || !prefix) { |
|
|