fix type
This commit is contained in:
parent
72031e49fc
commit
e3aeab8122
@ -8,7 +8,7 @@ export class RedisKVCache<T> {
|
|||||||
private memoryCache: MemoryKVCache<T>;
|
private memoryCache: MemoryKVCache<T>;
|
||||||
private fetcher: (key: string) => Promise<T>;
|
private fetcher: (key: string) => Promise<T>;
|
||||||
private toRedisConverter: (value: T) => string;
|
private toRedisConverter: (value: T) => string;
|
||||||
private fromRedisConverter: (value: string) => T;
|
private fromRedisConverter: (value: string) => T | undefined;
|
||||||
|
|
||||||
constructor(redisClient: RedisKVCache<T>['redisClient'], name: RedisKVCache<T>['name'], opts: {
|
constructor(redisClient: RedisKVCache<T>['redisClient'], name: RedisKVCache<T>['name'], opts: {
|
||||||
lifetime: RedisKVCache<T>['lifetime'];
|
lifetime: RedisKVCache<T>['lifetime'];
|
||||||
@ -92,7 +92,7 @@ export class RedisSingleCache<T> {
|
|||||||
private memoryCache: MemorySingleCache<T>;
|
private memoryCache: MemorySingleCache<T>;
|
||||||
private fetcher: () => Promise<T>;
|
private fetcher: () => Promise<T>;
|
||||||
private toRedisConverter: (value: T) => string;
|
private toRedisConverter: (value: T) => string;
|
||||||
private fromRedisConverter: (value: string) => T;
|
private fromRedisConverter: (value: string) => T | undefined;
|
||||||
|
|
||||||
constructor(redisClient: RedisSingleCache<T>['redisClient'], name: RedisSingleCache<T>['name'], opts: {
|
constructor(redisClient: RedisSingleCache<T>['redisClient'], name: RedisSingleCache<T>['name'], opts: {
|
||||||
lifetime: RedisSingleCache<T>['lifetime'];
|
lifetime: RedisSingleCache<T>['lifetime'];
|
||||||
|
Loading…
Reference in New Issue
Block a user