import { Nillable } from './types'; export declare namespace Cache { /** * Create a new TTL cache that proactively checks for expired items at regular intervals (defined by cleanupIntervalSeconds). * @param ttlSeconds - Time to live for each cache entry in seconds. If none is specified, it defaults to 10 minutes. * @param cleanupIntervalSeconds - Interval in seconds between each cleanup run. If not set, it defaults to 60 seconds. If set to -1, the cache will run in passive mode and only check for expired items when get() is called. * @returns Cache */ function active(ttlSeconds?: number, cleanupIntervalSeconds?: number): Cache; /** * Create a new TTL cache that only checks for expired items when get() is called. * @param ttlSeconds - Time to live for each cache entry in seconds. If none is specified, it defaults to 10 minutes. * @returns Cache */ function passive(ttlSeconds?: number): Cache; } export interface Cache { get(k: string): Nillable; set(k: string, v: T): void; shutdown(): void; }