UNPKG

ox

Version:

Ethereum Standard Library

25 lines 756 B
/** * Map with a LRU (Least recently used) policy. * * @see https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU * @internal */ export declare class LruMap<value = unknown> extends Map<string, value> { maxSize: number; constructor(size: number); get(key: string): value | undefined; set(key: string, value: value): this; } /** * Map with a bounded FIFO eviction policy. Cheaper than {@link LruMap} on hot * `get` paths because reads do not reorder entries; only writes touch the * eviction queue. * * @internal */ export declare class BoundedMap<value = unknown> extends Map<string, value> { maxSize: number; constructor(size: number); set(key: string, value: value): this; } //# sourceMappingURL=lru.d.ts.map