fixed some lint issues
This commit is contained in:
parent
8680b6ec20
commit
a700818a06
15 changed files with 1574 additions and 1319 deletions
8
libs/core/cache/src/redis-cache.ts
vendored
8
libs/core/cache/src/redis-cache.ts
vendored
|
|
@ -8,7 +8,7 @@ import type { CacheOptions, CacheProvider, CacheStats } from './types';
|
|||
*/
|
||||
export class RedisCache implements CacheProvider {
|
||||
private redis: Redis;
|
||||
private logger: any;
|
||||
private logger: { info?: (...args: unknown[]) => void; error?: (...args: unknown[]) => void } = console;
|
||||
private defaultTTL: number;
|
||||
private keyPrefix: string;
|
||||
private stats: CacheStats = {
|
||||
|
|
@ -63,7 +63,7 @@ export class RedisCache implements CacheProvider {
|
|||
}
|
||||
this.updateStats(true);
|
||||
return JSON.parse(value);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
this.updateStats(false, true);
|
||||
return null;
|
||||
}
|
||||
|
|
@ -135,7 +135,7 @@ export class RedisCache implements CacheProvider {
|
|||
async exists(key: string): Promise<boolean> {
|
||||
try {
|
||||
return (await this.redis.exists(this.getKey(key))) === 1;
|
||||
} catch (error) {
|
||||
} catch {
|
||||
this.updateStats(false, true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -184,7 +184,7 @@ export class RedisCache implements CacheProvider {
|
|||
});
|
||||
|
||||
return keys;
|
||||
} catch (error) {
|
||||
} catch {
|
||||
this.updateStats(false, true);
|
||||
return [];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue