Elestia Open Source Ratings
8.2

lru-cache

A strong pick. 2nd of 10 caching and Redis clients.

lru-cache is the standard in-process LRU cache for JavaScript. It has bounds by count, size and TTL, stale-while-revalidate fetching, no dependencies and built-in types. For a single-process memory cache it is the default pick today. It does not share data between processes, so a Redis client is still needed for a shared cache.

Best for: Node.js or browser code that needs a fast, bounded in-memory cache inside one process, with no extra dependencies.

WebsiteGitHubnpm

Scores

Overall8.2

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 8.0, likely 7.5 to 8.5

For an in-process cache it is the default choice: complete, fast, typed, dependency-free and trusted across the ecosystem. It does not do Redis or shared caching, so ioredis, node-redis or Keyv still cover that part of the category. Reliance on one maintainer and a weak Scorecard keep it from a 9.

GPT-6.2 Sol: 8.3, likely 7.1 to 9.1

For a new single-process cache, lru-cache is a stronger choice than node-cache thanks to explicit size limits, async refresh, and current maintenance. Keyv offers a cache API backed by Redis, and node-redis provides direct access to Redis commands. Concentrated release activity, a recent compatibility regression, and below-median adoption growth temper the recommendation.

Needed by many6.0

How many developers need a tool for this job?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

Many backend and tooling projects need an in-process memory cache, and it runs in Node and in browsers. It covers only the in-memory half of the category, not Redis or shared caching. That is a large group but not most developers.

GPT-6.2 Sol: 5.9, likely 4.7 to 7.1

A bounded local cache is useful in servers, browsers, and developer tooling. Each process keeps a separate copy, so the fit narrows when replicas need shared state. Runtime surveys show a large potential audience, but how often those projects need an explicit local cache is uncertain.

Helps a lot8.6

How well does it do the job for those who need it?

Claude Opus 5.5: 8.5, likely 7.5 to 9.0

It is the most complete in-memory LRU on npm: count, size and TTL bounds, dispose hooks, async fetch with deduplication and stale-while-revalidate, and diagnostics_channel metrics, all in TypeScript. Third-party benchmarks put it close to the fastest LRUs; a few micro-libraries are slightly faster at simple get and set. Its limits come from its design: it keeps data in one process only, and its TTL is loose.

GPT-6.2 Sol: 8.7, likely 7.6 to 9.5

Version 11.5.3 combines precise eviction limits, typed examples, per-entry expiry, and async refresh in a straightforward API. Expiry is lazy by default, so a TTL alone can leave a cache growing. An independent benchmark found good eviction throughput on Node and Bun, with smaller libraries ahead on some workloads.

Holds up over time7.4

Will it still be a good choice in two years?

Claude Opus 5.5: 7.5, likely 6.5 to 8.5

It is in active use and maintenance: 66 commits and 17 npm versions in the last year, the last in September 2026, with only 4 open issues. v11 has been stable since 2024 and only adds features in minor versions. The main risk is that one maintainer does most of the work; 18 pull requests are open and the Scorecard rates maintenance low.

GPT-6.2 Sol: 7.3, likely 6.0 to 8.5

The project made 66 commits and published 17 npm versions over the past year, with releases slowing to two patches since May. Recent release commits center on one maintainer, and GitHub Sponsors shows a way to fund the work. Users reported that 11.3.0 broke some jsdom and Vitest setups, and the maintainer addressed the underlying import issue within days. That response is encouraging, while concentrated release activity leaves the two-year outlook less certain.

Used widely8.3

How many use it, and is that growing?

Claude Opus 5.5: 9.0, likely 8.0 to 9.5

It has 1.2 million dependent repositories, the most in the category, ahead of Keyv. Its 3.2 billion downloads in four weeks are mostly transitive, through npm, glob and similar tools. The download ratio of about 3.1 is below the 4.1 median, so its share is stable to slightly falling. Even after these corrections, direct use runs to hundreds of thousands of projects.

  • dependents repos: 1,198,118 repos, 6,362 packages
  • npm downloadsLast4Weeks: 3.2B vs 1.03B a year ago, ratio about 3.1
  • medianDownloadsRatio: Median 4.1, so it is below the median
  • github stars: 5,920 stars

GPT-6.2 Sol: 7.5, likely 5.8 to 8.7

Ecosyste.ms found about 1.2 million dependent repositories and 6,362 dependent packages, the highest repository count in this group and slightly ahead of Keyv. Many installs come through other packages, and older versions still account for a large share, so direct adoption is hard to estimate. Four-week downloads grew 3.12× year over year, below the 4.1× catalog median and behind Keyv and ioredis, indicating a loss of relative ground.

  • dependents repos, dependents packages, peers dependentRepos: Leads the supplied peers in tracked dependent repositories.
  • npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio, peers: 3.12× growth trails the 4.1× catalog median.
  • project note: Other packages account for many installs.
  • npmjs.com/package/lru-cache?activeTab=versions: The legacy v10 release still records more weekly downloads than 11.5.3.
Vouched for8.1

Who stands behind it being good?

Claude Opus 5.5: 8.0, likely 7.0 to 9.0

Core tooling such as the npm CLI and glob runs it in production at huge scale. Independent comparisons recommend it as the production choice for in-memory caching, and other libraries benchmark themselves against it. There is no survey data for this kind of utility, and Hacker News and Bluesky barely discuss it.

GPT-6.2 Sol: 8.2, likely 7.0 to 9.1

Apollo Server uses it for its default in-memory cache, and jsdom directly declares 11.5.3 as its minimum version. An independent benchmark adds current performance evidence for a specific eviction workload. The range reflects limited evidence on developer satisfaction and performance across real application workloads.

Safe7.9

How safe is it to depend on?

Claude Opus 5.5: 8.0, likely 7.0 to 9.0

It has zero runtime dependencies, no OSV advisories ever, and a permissive BlueOak-1.0.0 licence, so the attack surface is small. The Scorecard is only 4: there is no code review, token permissions and dependency pinning are weak, and one person publishes releases. Its huge transitive reach makes the publish account a high-value target.

  • npm dependencies: 0 dependencies
  • advisories total: 0 advisories
  • scorecard score: 4/10; Code-Review 0, Token-Permissions 0, Pinned-Dependencies 0
  • github license: BlueOak-1.0.0, permissive

GPT-6.2 Sol: 7.8, likely 6.5 to 8.9

Zero runtime dependencies, no recorded OSV advisories, and the permissive Blue Oak Model License 1.0.0 keep dependency risk low. OpenSSF Scorecard gives it 4 out of 10, with zeroes for code review, workflow token permissions, dependency pinning, and fuzzing. The release scripts invoke npm publish directly, and uncertainty about the publisher roster and release provenance widens the range.

Good

  • Zero dependencies, written in TypeScript, with a minified export.
  • Bounds by item count, by total size through sizeCalculation, and by TTL.
  • fetchMethod deduplicates in-flight loads and supports stale-while-revalidate, which helps prevent cache stampedes.
  • Battle-tested: npm's own tooling and over a million repositories depend on it.

Bad

  • Memory only and per process: no persistence and no cache shared across instances.
  • TTL is not strictly enforced; for a TTL-only cache the same author points to @isaacs/ttlcache.
  • One maintainer does most of the releases, and the OpenSSF Scorecard is a low 4 (no code review, unpinned dependencies).
  • Majors v7 to v10 came close together, with changes to exports and types that broke some upgrades.

The numbers

npm downloads, 4 weeks
3.2B ×3.1 in a year
GitHub stars
5.9k
Commits, 12 months
66
npm version
11.5.3 Sept 2026
Versions, 12 months
17
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
4.0 out of 10, Nov 2026
Licence
BlueOak-1.0.0

Many packages install it, so most downloads are not a direct choice.

Read on 21 November 2026 from GitHub (isaacs/node-lru-cache), npm (lru-cache), OSV and the OpenSSF Scorecard.

Caching and Redis clients

  1. 8.3node-redis
  2. 8.2lru-cache
  3. 7.3Upstash Redis
  4. 7.1Valkey GLIDE
  5. 7.0unstorage
  6. 6.9ioredis
  7. 6.5BentoCache
  8. 6.3Keyv
  9. 6.2cache-manager
  10. 3.2node-cache
Compare all 10 on six scores