CodeBrowser / npm / lru-cache
lru-cache@11.5.2
// A cache object that deletes the least-recently-used items.
$ npm install lru-cache
downloads/wk
514,106,371
license
BlueOak-1.0.0
version
11.5.2
published
Jul 7, 2026
What is lru-cache?
lru-cache is a data structure that automatically removes the least-recently-used items when it reaches a specified size limit, keeping only the most frequently accessed data. Developers use it to optimize performance by storing expensive computations or frequently-accessed data in memory without the cache growing unbounded. It's useful in scenarios like memoization, API response caching, or any situation where you need fast lookups with predictable memory usage.
Keywords
#mru #lru #cache
Maintainers
isaacs