/** * A bounded insert for a Map used as a cache. * * The caches in this package were written for a stdio server that one person * runs, where a Map that only ever grows is harmless. Hosted behind an HTTP route * it is a leak: the catalogue cache gains an entry for every distinct number that * ever asks, and nothing removes it once it has expired, because expiry was only * ever checked on read. * * Insertion order is the eviction order, so a key that is set again moves to the * back and the least recently written entry goes first. */ export declare function setBounded(map: Map, key: K, value: V, max: number, isExpired?: (value: V) => boolean): void;