/** * A Map-like object that can kick out entries after a TTL or after a max number * of values are saved. This is implemented separately from the MemoryStore, * to separate the eviction logic from the "matching usable entries" logic. */ export default class ExpiringEntryMap { private readonly store; private onItemEviction?; private cleanupJobTimer; private cleanupIterator; /** * @param opts.numItemsLimit If provided, the map will evict the least * recently used item when the number of items stored exceeds this limit. * * @param opts.onItemEviction callback that is called *after* an item is * removed from the cache (via manual deletion, expiration, or the map * exceeding the numItemsLimit). */ constructor(opts?: { numItemsLimit?: number | undefined; onItemEviction?: (evictedItem: V, evictedItemKey: K) => Promise; }); get(key: K): V | undefined; set(key: K, value: V, ttl: number): this; has(key: K): boolean; delete(key: K): boolean; close(): void; [Symbol.asyncDispose](): Promise; } //# sourceMappingURL=ExpiringEntryMap.d.ts.map