import { ClusterNode, ClusterOptions, SentinelConnectionOptions } from "ioredis"; import { Context, CacheRefreshStrategy } from "../../types"; import type { MemoryCache } from "./MemoryCache"; import type { RedisCache } from "./RedisCache"; import type { MongoCache } from "./MongoCache"; import { CacheRefreshScheduler } from "./scheduler"; export interface CacheEntry { payload: unknown; staleOn: Date; expiresOn?: Date; } export interface CacheSettings { staleTTL?: number; expiresTTL?: number | "never"; allowStale?: boolean; cacheRefreshStrategy?: CacheRefreshStrategy; connectionUrl?: string; databaseName?: string; collectionName?: string; useAdditionalMemoryCache?: boolean; publishPayloadToChannel?: boolean; useCluster?: boolean; clusterRootNodesJSON?: ClusterNode[]; clusterOptionsJSON?: ClusterOptions; useSentinel?: boolean; sentinelConnectionOptionsJSON?: SentinelConnectionOptions; } export type FeaturesCache = MemoryCache | RedisCache | MongoCache | null; export declare let featuresCache: FeaturesCache; export declare let cacheRefreshScheduler: CacheRefreshScheduler | undefined; export declare const initializeCache: (context: Context) => Promise;