/** * Cache computed values or resources for a specified duration to improve performances. * * @license * Copyright 2022-2024 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ declare class GenericCache { private readonly expirationMs; private readonly expireCallback?; protected readonly knownKeys: Set; protected readonly values: Map; protected readonly timestamps: Map; private readonly periodicTimer; constructor(name: string, expirationMs: number, expireCallback?: ((key: string, value: T) => Promise) | undefined); keys(): string[]; private deleteEntry; clear(): Promise; close(): Promise; private expire; } export declare class Cache extends GenericCache { private readonly generator; constructor(name: string, generator: (...params: any[]) => T, expirationMs: number, expireCallback?: (key: string, value: T) => Promise); get(...params: any[]): T; } export declare class AsyncCache extends GenericCache { private readonly generator; constructor(name: string, generator: (...params: any[]) => Promise, expirationMs: number, expireCallback?: (key: string, value: T) => Promise); get(...params: any[]): Promise; } export {}; //# sourceMappingURL=Cache.d.ts.map