function boundedLru
boundedLru<
K,
V,
>
(maxSize: number): BoundedLru<K, V>

Create a bounded LRU (Least Recently Used) cache. Evicts the least-recently-used entry when capacity is reached. Uses a doubly-linked list for O(1) LRU tracking so that get() does not mutate the key-value index.

Type Parameters

Parameters

maxSize: number

Return Type

Usage

import { boundedLru } from "doc.ts";