import Redis, { Cluster } from "ioredis"; import { Context } from "../../types"; import { CacheEntry, CacheSettings } from "./index"; import { CacheRefreshStrategy } from "../../types"; export declare class RedisCache { private client; private clientUUID; private readonly publishPayloadToChannel; private subscriberClient; private readonly memoryCacheClient; private readonly connectionUrl; private readonly staleTTL; private readonly expiresTTL; readonly allowStale: boolean; readonly cacheRefreshStrategy: CacheRefreshStrategy; private readonly useCluster; private readonly clusterRootNodesJSON?; private readonly clusterOptions?; private readonly useSentinel; private readonly sentinelConnectionOptions?; private readonly appContext?; constructor({ staleTTL, // 1 minute expiresTTL, // 10 minutes allowStale, cacheRefreshStrategy, connectionUrl, useAdditionalMemoryCache, publishPayloadToChannel, useCluster, clusterRootNodesJSON, clusterOptionsJSON, useSentinel, sentinelConnectionOptionsJSON, }?: CacheSettings, appContext?: Context); connect(): Promise; get(key: string): Promise; set(key: string, payload: unknown): Promise; private subscribe; getClient(): Cluster | Redis | undefined; getsubscriberClient(): Cluster | Redis | undefined; getStatus(): Promise<"connect" | "close" | "end" | "ready" | "reconnecting" | "wait" | "connecting" | "disconnecting" | undefined>; }