Keyv
Reasonable, with limits. 8th of 10 caching and Redis clients.
Keyv gives you one simple get/set/TTL API over memory, Redis, Valkey, Postgres, SQLite and other backends, through adapter packages. It is a reasonable pick when you want the backend to be swappable. But v6 only became stable in October 2026 and breaks a lot of v5 code, cache-manager and cacheable still need v5, and a hijacked maintainer account shipped malware as keyv 6.0.0 in August 2026.
Best for: Node.js services that want a small key-value cache API and may switch between memory, Redis or SQL storage later.
Scores
Overall6.3
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 5.5, likely 4.0 to 7.0
Keyv is a capable, actively maintained key-value layer, but now is a hard time to adopt it. v6 just landed with many silent breaks, the author's own caching libraries still need v5, and the August 2026 compromise is recent. For plain Redis, ioredis or node-redis is more direct. For memory, lru-cache. For multi-runtime storage, unstorage is growing faster. The range is wide because the security hardening may hold up well and the ecosystem may move to v6 soon.
- npm downloadsSame4WeeksYearAgo: Growth below the category median
- peers unstorage: unstorage grew about 9.5x year over year, against keyv's 3.6x
- keyv.org/docs/v5-to-v6: v6 is not compatible with cache-manager or cacheable yet
- heise.de/en/news/Supply-chain-attack-on-keyv-Shai-Hulud-worm-infects-over-440-npm-packages-11403367.html: The worm spread from keyv to more than 440 packages
GPT-6.2 Sol: 7.1, likely 5.9 to 8.2
Keyv 6.1.0 is a strong pick when keeping one cache API across memory and Redis matters. For a bounded in-process cache, lru-cache is the better fit, and node-redis is the better fit when the application needs Redis transactions or Pub/Sub. Active maintenance and improved publishing controls help, while compatibility with v5 integrations and the short track record after the compromise keep the recommendation conditional.
- github.com/jaredwray/keyv/releases/tag/v6.1.0: Stable v6 release with adapter fixes and stronger publishing controls.
- keyv.org/docs/migration/v5-to-v6: Lists important compatibility changes and libraries still on v5.
- github.com/isaacs/node-lru-cache: Documents count- and size-bounded in-process caching.
- github.com/redis/node-redis: Documents direct Redis transactions and Pub/Sub.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: Install growth trails the catalog baseline.
Needed by many6.2
How many developers need a tool for this job?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
Many backend developers need a cache or key-value store. Keyv's take is a storage-agnostic layer for Node, which is narrower than caching in general. Many teams go straight to a Redis client or lru-cache instead.
- keyv.org/docs/v5-to-v6: v6 needs Node >= 22.19, so it targets Node services only
- devpick.pages.dev/keyv-vs-unstorage: Keyv is Node-focused; unstorage covers browser and edge runtimes too
GPT-6.2 Sol: 6.3, likely 5.2 to 7.5
Expiring caches are useful across APIs, background jobs, and data-heavy web apps. Keyv serves several runtimes and storage backends, but its appeal is strongest when the same code needs to work with multiple stores. Redis usage gives a sense of the category's size, while demand for a portable cache API is less directly measured.
- survey.stackoverflow.co/2026/technology: Redis was used by 28.3% of database-question respondents.
- keyv.org: Documents memory, Redis, Valkey, SQL, browser, and Bun support.
- keyv.org/docs/migration/v5-to-v6: The v6 packages require Node.js 22.19 or later on Node.
Helps a lot6.8
How well does it do the job for those who need it?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
The API is simple and typed, and the many first-party adapters make it a good thin abstraction. But it is only a key-value layer. It has no tiered caching or stampede protection, which cache-manager, cacheable and BentoCache add on top. v6 was just released with many silent behaviour changes and is not yet usable with the author's own higher-level libraries. AI agents also often write v5-style code, such as raw: true or relying on the default namespace.
- keyv.org/docs/v5-to-v6: Long list of breaking and silent changes; v6 is incompatible with cache-manager 7 and cacheable 2
- newreleases.io/project/npm/keyv/release/6.1.0: 6.1.0 is the first stable v6
- npm hasTypes: Ships its own TypeScript types
GPT-6.2 Sol: 7.5, likely 6.3 to 8.6
Version 6.1.0 has a small typed API, batch methods, and clear adapter docs for expiry and connection errors. Coding agents have current examples, but TypeScript still accepts an old Redis constructor form that silently selects memory. An October test reported silent cache misses with mixed v5 and v6 dependencies, and the direct in-memory comparison I found tested v5.
- keyv.org/docs/storage-adapters/redis: Documents Redis connection modes, errors, and expiry behavior.
- keyv.org/docs/migration/v5-to-v6: Documents silent memory fallback and v5 interoperability failures.
- nihardaily.com/posts/nestjs-redis-caching-cache-manager-traps-measured: Reports repeated backend calls from cache-manager wrap with Keyv 6.1.0.
- github.com/Pawangupta123/CacheForge/blob/main/docs/benchmarks.md: One-machine memory benchmark favored synchronous lru-cache.
- github.com/Pawangupta123/CacheForge/blob/main/package.json: The benchmark project uses Keyv v5.
Holds up over time6.5
Will it still be a good choice in two years?
Claude Opus 5.5: 6.0, likely 5.0 to 8.0
Maintenance is very active: 493 commits, 12 releases, 2 open issues and 0 open pull requests. Releases now go through a controlled, hardened process. But the project mostly depends on one maintainer. The v6 break splits users, and dependent libraries have not moved to v6 yet. The account compromise is an example of the single-person risk.
- github commitsLastYear: 493 commits, 12 releases last year
- github openIssues: 2 open issues against 369 closed
- jaredwray.com/blog/keyv-and-cacheable-chaindrop-worm: Maintainer adopted staged publishing, branch rulesets and CODEOWNERS after the incident
- keyv.org/docs/v5-to-v6: v5 is now in maintenance mode
GPT-6.2 Sol: 7.0, likely 5.7 to 8.2
The repository is active, and October's v6.1.0 release aligned core and adapter versions while keeping v5 in maintenance. The v6 upgrade changes namespaces and adapter behavior in ways that can make existing cached values unreadable without configuration changes. The latest release lists one contributor, and the funding, release backup, and typical issue turnaround are hard to establish.
- github commitsLastYear, releasesLastYear, pushedAt, openIssues, openPullRequests: 493 monorepo commits, 12 releases, and a small open queue in the snapshot.
- npm versionsLastYear, latestPublishedAt: Three core package versions in a year, with the latest in October.
- github.com/jaredwray/keyv/releases/tag/v6.1.0: One listed release contributor, 20 packages released together, and continued v5 maintenance.
- keyv.org/docs/migration/v5-to-v6: Documents namespace, serialization, and adapter migration requirements.
Used widely6.0
How many use it, and is that growing?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
892M downloads in 4 weeks looks huge, but most of it comes in as a dependency of cacheable-request (used by got), flat-cache and file-entry-cache (used by ESLint), and cache-manager. Its growth ratio of 3.6 is below the 4.1 median, so it is losing ground. About 1,045 dependent packages suggests that tens of thousands of projects choose it directly.
- npm downloadsLast4Weeks: 892M now vs 248M a year ago, a ratio of about 3.6, below the 4.1 median
- dependents: 1.08M repos (mostly transitive) and 1,045 packages
- heise.de/en/news/Supply-chain-attack-on-keyv-Shai-Hulud-worm-infects-over-440-npm-packages-11403367.html: Packages affected included flat-cache, file-entry-cache and cacheable-request, showing that keyv mostly arrives through them
GPT-6.2 Sol: 5.9, likely 4.3 to 7.5
Keyv reached 892 million four-week downloads, up 3.59× year over year. That trails the catalog's 4.1× baseline and growth at ioredis and unstorage, suggesting it lost relative ground. The 1.08 million indexed repositories show a large footprint, but chains such as ESLint's cache dependencies make direct choices difficult to estimate. Its 3,215 stars cover the whole monorepo, and recent social attention mostly reflects the compromise.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio, peers: Keyv grew 3.59×, versus 4.1× overall, 4.50× for ioredis, and 9.47× for unstorage.
- dependents repos, packages: 1,079,901 indexed repositories and 1,045 npm packages.
- github stars, hackerNews top, bluesky posts: 3,215 repository stars, four Bluesky posts, and a leading HN thread about the compromise.
- github.com/actions/setup-java/issues/1193: GitHub Actions maintainers trace their development-only copy through ESLint.
Vouched for5.9
Who stands behind it being good?
Claude Opus 5.5: 5.0, likely 4.0 to 7.0
Widely used tools build on it: got through cacheable-request, ESLint through flat-cache, and NestJS caching through cache-manager. But most of those links are the same author's own packages, not independent choices. I found no survey data or independent benchmarks.
- npm-compare.com/cache-manager,keyv,levelup,lru-cache,memory-cache,node-cache,node-persist,redis: Third-party comparison lists keyv alongside main cache libraries
- cacheable-request / flat-cache / cache-manager: got, ESLint and NestJS reach keyv through the same author's packages
GPT-6.2 Sol: 6.8, likely 5.5 to 8.0
NestJS builds its documented cache integration on Keyv through cache-manager, and Got accepts Keyv stores for HTTP caching. Developers report working Redis setups alongside version and connection issues. Those integrations validate the design, while the production track record and independent measurements for 6.1.0 are still limited.
- docs.nestjs.com/techniques/caching: NestJS documents Keyv-backed caching and a Redis setup.
- github.com/sindresorhus/got/blob/main/source/core/options.ts: Got's cache option accepts Keyv instances and adapters.
- github.com/nestjs/nest/issues/14580: Users report successful workarounds and Redis connection trouble on older versions.
- nihardaily.com/posts/nestjs-redis-caching-cache-manager-traps-measured: Independent application test reports good results with matched versions and silent misses with mixed versions.
Safe5.4
How safe is it to depend on?
Claude Opus 5.5: 5.0, likely 3.0 to 6.0
In August 2026 a stolen maintainer token was used to publish keyv 6.0.0 with a credential-stealing preinstall worm. The release carried valid provenance, and the worm spread to hundreds of packages. The bad versions were removed within about 7 hours, and publishing has since been hardened with staged, 2FA-approved releases. Scorecard is 7, but Code-Review scores 0 and Branch-Protection 3, which reflects solo-maintainer review. It has one dependency and an MIT licence.
- advisories: MAL-2026-11524: malicious code in keyv, August 2026
- scorecard: Score 7; Code-Review 0, Branch-Protection 3
- snyk.io/blog/inside-keyv-npm-compromise-preinstall-malware-trusted-provenance-ide-hooks: Timeline: keyv@6.0.0 published with a preinstall hook, and provenance passed
- aikido.dev/blog/keyv-and-friends-compromised-in-npm-supply-chain-attack: The maintainer's GitHub account was compromised and malware was pushed to main
- jaredwray.com/blog/keyv-and-cacheable-chaindrop-worm: Removed within about 7 hours; staged publishing and rulesets added afterwards
GPT-6.2 Sol: 5.8, likely 4.3 to 7.2
The August 4 compromise put malicious keyv@6.0.0 on npm with valid provenance. It was flagged that day and withdrawn, and the advisory identifies 6.0.0 as the affected core version. The MIT-licensed core has one runtime dependency, and v6.1.0 introduced staged publishing with maintainer approval by 2FA and a malware scan. Those controls reduce publishing risk, but November's weak review and branch protection checks and limited visibility into who can approve releases leave real uncertainty.
- osv.dev/vulnerability/MAL-2026-11524: Records the August 4 advisory and identifies 6.0.0 as the malicious version.
- securitylabs.datadoghq.com/articles/npm-worm-compromises-popular-npm-packages: Independently verifies the release timeline and valid provenance.
- blog.centriole.io/shai-hulud-here-we-go-again: Records keyv@6.0.0 as unpublished.
- github.com/jaredwray/keyv/releases/tag/v6.1.0: Documents staged publishing, 2FA approval, and the Aikido scan.
- npm license, dependencies: MIT and one direct runtime dependency in core.
- scorecard score, checks: 7/10 overall, with code review at 0/10 and branch protection at 3/10.
Good
- One small, Map-like API with TTL and namespaces that works across many official storage adapters.
- Very active: 493 commits and 12 releases in the last year, with almost no open issues or pull requests.
- Ships its own TypeScript types and pulls in only one dependency.
- After the August 2026 attack, publishing moved to staged releases that a maintainer must approve with 2FA, and branch rules were tightened.
Bad
- The v5 to v6 change breaks a lot, and some of it fails silently: there is no default namespace, so v5 data reads as missing, and TTL handling in adapters changed.
- cache-manager 7 and cacheable 2 still need keyv v5, so the ecosystem is split between two major versions.
- v6 requires Node.js 22.19 or later and targets Node only. unstorage does better on edge and browser runtimes.
- It has one main maintainer, and the August 2026 malware release shows how much depends on that one account.
The numbers
- npm downloads, 4 weeks
- 892M ×3.6 in a year
- GitHub stars
- 3.2k
- Commits, 12 months
- 493
- npm version
- 6.1.0 Oct 2026
- Versions, 12 months
- 3
- Advisories, 24 months
- 1 of 1 ever
- OpenSSF Scorecard
- 7.0 out of 10, Nov 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (jaredwray/keyv), npm (keyv), OSV and the OpenSSF Scorecard.
Caching and Redis clients
- 8.3node-redis
- 8.2lru-cache
- 7.3Upstash Redis
- 7.1Valkey GLIDE
- 7.0unstorage
- 6.9ioredis
- 6.5BentoCache
- 6.3Keyv
- 6.2cache-manager
- 3.2node-cache