import { CacheKeyManifest } from './key-manifest'; import { CacheEntry, ICache, CacheKey } from './shared'; export declare class CacheManager { private cache; private keyManifest?; private nowProvider; constructor(cache: ICache, keyManifest?: CacheKeyManifest | undefined, nowProvider?: () => number | Promise); get(cacheKey: CacheKey, expiryAdjustmentSeconds?: number): Promise | undefined>; set(entry: CacheEntry): Promise; clear(clientId?: string): Promise; private wrapCacheEntry; private getCacheKeys; /** * Finds the corresponding key in the cache based on the provided cache key. * The keys inside the cache are in the format {prefix}::{clientId}::{scope}. * The first key in the cache that satisfies the following conditions is returned * - `prefix` is strict equal to Viverse's internally configured `keyPrefix` * - `clientId` is strict equal to the `cacheKey.clientId` * - `scope` contains at least all the `cacheKey.scope` values * * * @param keyToMatch The provided cache key * @param allKeys A list of existing cache keys */ private matchExistingCacheKey; }