import { Analytics } from "./analytics"; import { Cache, ComputeValueForKeyAsyncFn, ComputeValueForKeyFn, EvictionPolicy } from "./externals"; export declare class CacheImpl implements Cache { readonly name: string; readonly maxSize: number; readonly evictionPolicy: EvictionPolicy; readonly _map: Map; readonly analytics: Analytics.KeyHistory; constructor(name: string, maxSize: number, evictionPolicy: EvictionPolicy); clear: () => void; get: (arg: K) => V | undefined; getAndComputeIfAbsent: (arg: K, keyNotFoundFn: ComputeValueForKeyFn) => V; getAndComputeIfAbsentAsync: (arg: K, keyNotFoundAsyncFn: ComputeValueForKeyAsyncFn) => Promise; cleanUp: () => void; put: (arg: K, value: V) => void; contains: (arg: K) => boolean; /** Getter that returns the size. */ get size(): number; }