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