UNPKG

cache-manager-ioredis-wildcard-delete

Version:
16 lines (15 loc) 671 B
import Redis, { RedisOptions } from 'ioredis'; import type { Cache, Config, Store } from 'cache-manager'; export type RedisCache = Cache<RedisStore>; export interface RedisStore extends Store { readonly isCacheable: (value: unknown) => boolean; get client(): Redis; } export declare class NoCacheableError implements Error { message: string; name: string; constructor(message: string); } export declare const avoidNoCacheable: <T>(p: Promise<T>) => Promise<T | undefined>; export declare function redisStore(options?: RedisOptions & Config): Promise<RedisStore>; export declare function redisInsStore(redisCache: Redis, options?: Config): RedisStore;