cache-manager
Reasonable, with limits. 9th of 10 caching and Redis clients.
cache-manager is a long-running Node.js caching layer, now rebuilt on Keyv stores. It gives you one get/set/wrap API over memory, Redis and other backends, and it is the default under NestJS's official caching module. It works well for simple cache-aside and tiered caching. But in August 2026 a hijacked maintainer account pushed a malicious release (7.2.10), and BentoCache does advanced multi-tier caching better, so it is a reasonable pick rather than a clear default.
Best for: NestJS and Node.js backend teams that want a simple, store-agnostic cache API with wrap() memoization over memory or Redis.
Scores
Overall6.2
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 5.5, likely 4.5 to 6.5
It is a practical, widely installed cache abstraction, and NestJS users get it almost by default. But it is limited next to BentoCache for multi-tier caching. It is losing share relative to the market, and the August 2026 account hijack shows the risk of one maintainer controlling releases. Pin your versions, turn off install scripts, and choose it mainly for NestJS or simple cache-aside needs.
- npm downloads ratio: 2.56 vs 4.1 median, so it is losing ground
- cycode.com/blog/keyv-cacheable-npm-worm-ai-coding-agents: A caret range would have silently installed the malicious patch
- peers BentoCache: A peer with richer multi-tier caching features
GPT-6.2 Sol: 6.9, likely 5.7 to 8.0
cache-manager is a good choice for new NestJS services that want memory and Redis behind one API, especially when they will use `wrap()` for shared loads and early refresh. For a bounded in-process cache, lru-cache is simpler, and node-redis is the better fit for direct Redis commands. Keyv compatibility, slower relative adoption, and uncertainty about the new publishing controls keep it from being a category default.
- docs.nestjs.com/data/caching: Official integration makes it a natural fit for NestJS
- github.com/isaacs/node-lru-cache: Peer provides bounded in-process caching with eviction
- github.com/redis/node-redis: Peer exposes Redis commands directly
- keyv.org/docs/migration/v5-to-v6: The stable cache-manager line needs Keyv v5-compatible stores
- osv.dev/vulnerability/MAL-2026-11523: Recent compromise was limited to a specific npm version
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: Adoption signal grew more slowly than the catalog baseline
Needed by many5.8
How many developers need a tool for this job?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
Most server-side Node.js apps that call slow databases or APIs eventually need an app-level cache. cache-manager targets exactly that job. It is backend-only and an abstraction layer rather than a Redis client, so it serves a large group but not most JavaScript developers.
- dependents: 107k dependent repos, so the need is broad
- npm-compare.com/cache-manager,keyv,levelup,lru-cache,memory-cache,node-cache,node-persist,redis: Positioned as a unified caching API used in frameworks like NestJS
GPT-6.2 Sol: 5.6, likely 4.4 to 6.7
Caching repeated database reads and expensive work is useful across many Node.js backends. cache-manager is framework-independent, but its main appeal is for services that want interchangeable stores or memory and Redis together. Surveys show demand for Redis and NestJS, while the share of JavaScript and TypeScript projects that need this particular setup is uncertain.
- cacheable.org/docs/cache-manager: Standalone Node.js API with configurable cache tiers and adapters
- survey.stackoverflow.co/2025/technology: Redis usage shows demand for the underlying technology
- 2025.stateofjs.com/en-US/libraries/back-end-frameworks: Tracks adoption of NestJS and other back-end frameworks
Helps a lot6.7
How well does it do the job for those who need it?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
Since v6, cache-manager runs on Keyv stores. It offers tiered stores, wrap() memoization, TTLs and background refresh, with good types. Users who need stampede protection at the framework level, tag invalidation, stale-while-revalidate or local-cache sync turn to BentoCache or custom layers. It is good for simple cache-aside, with clear limits for heavier production use.
- dev.to/sur-ser/moving-from-cache-manager-to-a-production-grade-caching-layer-in-nestjs-2c7j: User moved off it over missing tags, SWR and stampede handling in Nest
- cdn.jsdelivr.net/npm/cache-manager@7.2.8/README.md: v7 built on Keyv; the miss value changed from null to undefined
- app.unpkg.com/bentocache@1.4.0/files/README.md: BentoCache adds grace periods, a bus and multi-tier resiliency
- npm hasTypes: Ships TypeScript types
GPT-6.2 Sol: 7.3, likely 6.2 to 8.4
Version 7.2.9 has bundled types, clear examples for common calls, and a useful `wrap()` API for sharing loads and refreshing entries. An independent NestJS test observed one database call for 50 concurrent cold requests using `wrap()`, alongside stale local entries across instances after invalidation. Keyv v6 instances can silently break `ttl()` and refresh, and the available measurements cover a limited set of setups.
- npm latestVersion, hasTypes: Stable npm release 7.2.9 ships types
- cacheable.org/docs/cache-manager: Documents tiering, function wrapping, refresh, and bulk methods
- rakibulinux.com/blogs/nestjs-redis-cache-manager: Independent tests of concurrent loads, stale local copies, and Redis outages
- keyv.org/docs/migration/v5-to-v6: Documents silent failure modes when mixing Keyv major versions
Holds up over time6.1
Will it still be a good choice in two years?
Claude Opus 5.5: 6.0, likely 4.5 to 7.5
The monorepo is active: 278 commits and 16 releases in the last year, one open issue and no open PRs. But cache-manager itself has had no npm release since June 2026, and one maintainer carries the whole family. The account compromise also halted publishing for a while. NestJS still depends on it, which keeps it relevant.
- github commitsLastYear: 278 commits; 1 open issue
- npm latestPublishedAt: Last cache-manager release was 7.2.9 in June 2026
- github.com/jaredwray/cacheable/issues/1692: Maintainer disabled publishing during the cleanup after the compromise
GPT-6.2 Sol: 6.2, likely 4.9 to 7.4
The shared repository is active and maintainers merged a contributed fix for bulk deletion, which appears in the November GitHub release notes. The npm package had four releases in the past year and its current published version dates to June. Users reported migration work after the v6 adapter switch, and v7 still relies on the maintenance-only Keyv v5 line. The number of release approvers and the package's funding are unclear.
- github commitsLastYear, releasesLastYear, contributors: 278 commits, 16 releases, and 116 contributors across the shared repository
- npm versionsLastYear, latestPublishedAt: Four package versions in a year, with the latest published in June
- github.com/jaredwray/cacheable/releases: November repository notes list a cache-manager bulk deletion fix
- github.com/jaredwray/cacheable/pull/1697: A contributed package fix was reviewed and merged
- github.com/nestjs/cache-manager/issues/516: A user reports code changes after the move to Keyv
- keyv.org/docs/migration/v5-to-v6: Keyv v5 is in maintenance mode
Used widely6.4
How many use it, and is that growing?
Claude Opus 5.5: 6.5, likely 5.5 to 7.5
It has about 25M downloads per 4 weeks and 107k dependent repos, more repos than ioredis. Much of that use comes through @nestjs/cache-manager. Its growth ratio of 2.6 is well below the 4.1 median, so it is losing share even though its totals are large.
- npm downloadsLast4Weeks: 25.1M now vs 9.8M a year ago (ratio 2.56, median 4.1)
- dependents: 107,123 repos and 784 packages
- bluesky posts: Only 2 posts; little attention
GPT-6.2 Sol: 6.3, likely 5.0 to 7.5
ecosyste.ms found about 107,000 dependent repositories, between ioredis and node-redis and well below Keyv and lru-cache. Four-week downloads rose from 9.8 million to 25.1 million, or 2.56×, below the 4.1× catalog median and behind those four peers. NestJS caching accounts for some adoption, so installs overstate how often teams independently choose the library. Shared repository stars and sparse discussion offer little precision on new adoption.
- dependents repos, packages: 107,123 tracked repositories and 784 npm packages
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: Downloads grew 2.56× against the 4.1× baseline
- peers: Dependent-repository counts and download ratios put scale and growth in context
- project note, github stars, bluesky posts, hackerNews stories: Stars cover several packages, with two Bluesky links and zero Hacker News matches
- github.com/nestjs/cache-manager/blob/master/package.json: NestJS declares cache-manager as a peer dependency
Vouched for6.0
Who stands behind it being good?
Claude Opus 5.5: 5.0, likely 3.5 to 6.5
Its main endorsement is NestJS's official caching module, which builds on it. I found no survey data, independent benchmarks or recent production write-ups. The write-ups that do exist mostly describe its limits or the 2026 compromise.
- openapps.pro/packages/nestjs-cache-manager: @nestjs/cache-manager builds on cache-manager v6/v7
- hackerNews stories: No HN stories
- dev.to/sur-ser/moving-from-cache-manager-to-a-production-grade-caching-layer-in-nestjs-2c7j: Independent user found it too limited for production
GPT-6.2 Sol: 7.0, likely 5.9 to 8.1
NestJS builds its official caching module on cache-manager, and Twenty CRM declares the current release line in its server. Independent testing confirms useful behavior under concurrent load and shows how Redis failure handling depends on adapter settings. Direct satisfaction data and evidence from large deployments outside NestJS are sparse.
- docs.nestjs.com/data/caching: NestJS documents cache-manager as the basis for its caching integration
- github.com/twentyhq/twenty/blob/main/packages/twenty-server/package.json: Twenty CRM lists cache-manager ^7.2.9 in its server dependencies
- rakibulinux.com/blogs/nestjs-redis-cache-manager: External measurements of concurrent loads and Redis outage behavior
Safe4.9
How safe is it to depend on?
Claude Opus 5.5: 4.0, likely 3.0 to 5.5
On 4 August 2026 an attacker took over the maintainer's GitHub account and published cache-manager 7.2.10. It ran a credential stealer at install time and passed provenance checks. The maintainer and npm removed it and restored 7.2.9 within about a day. Still, one account controls releases, there is no Scorecard, and its two dependencies come from the same compromised family. The MIT licence and small dependency tree help.
- advisories MAL-2026-11523: Malicious cache-manager 7.2.10 published 2026-08-04
- osv.dev/vulnerability/MAL-2026-11523: Preinstall stealer; passed npm provenance
- chainguard.dev/unchained/the-keyv-and-cacheable-npm-supply-chain-attack-inside-the-mini-shai-hulud-campaign: npm restored 7.2.9 as the clean latest
- wiz.io/blog/keyv-and-cacheable-npm-supply-chain-attack: The worm spread to 400+ packages from this account's compromise
- github.com/jaredwray/cacheable/issues/1692: Maintainer reset main, disabled CI publishing and removed the bad releases
- scorecard: No OpenSSF Scorecard
GPT-6.2 Sol: 5.8, likely 4.5 to 7.2
The August ChainDrop compromise put a malicious 7.2.10 tarball on npm through the normal release workflow. The affected npm version was removed and 7.2.9 was restored as latest the same day. The package has two direct dependencies and an MIT licence, and the current workflow stages releases for maintainer approval with two-factor authentication. The new controls have a short track record, and the supplied snapshot includes no OpenSSF Scorecard or verified count of release approvers.
- osv.dev/vulnerability/MAL-2026-11523: Lists 7.2.10 as the affected npm version
- securitylabs.datadoghq.com/articles/npm-worm-compromises-popular-npm-packages: Independently traces the poisoned version to the normal release workflow
- jaredwray.com/blog/keyv-and-cacheable-chaindrop-worm: Maintainer reports same-day rollback and publishing credential changes
- github.com/jaredwray/cacheable/blob/main/.github/workflows/release.yml: Current workflow stages artifacts for human approval
- npm license, dependencies, latestVersion, scorecard: MIT, two direct dependencies, current 7.2.9, and no collected Scorecard
Good
- One small API (get, set, del, wrap) works across any Keyv store, including in-memory, Redis, Valkey, Mongo and Postgres.
- Supports several tiers of stores and background refresh through refreshThreshold, so an in-memory tier can sit in front of Redis.
- NestJS's official @nestjs/cache-manager builds on it, so many tutorials and AI-generated snippets target it.
- It ships TypeScript types, has only two dependencies, uses the MIT licence and keeps an almost empty issue tracker.
Bad
- In August 2026 a hijacked maintainer account published a malicious release, 7.2.10, that stole credentials at install time and passed npm provenance checks.
- It has no tag-based invalidation, grace periods or cross-instance bus sync, and BentoCache offers all of these.
- Breaking changes across v5, v6 and v7 (new store adapters, null becoming undefined on a miss) forced migrations and left NestJS users with version mismatches.
- One person maintains it, and the same author's newer 'cacheable' package now gets most of the attention.
The numbers
- npm downloads, 4 weeks
- 25M ×2.6 in a year
- GitHub stars
- 2k
- Commits, 12 months
- 278
- npm version
- 7.2.9 Jun 2026
- Versions, 12 months
- 4
- Advisories, 24 months
- 1 of 1 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
The repository holds several cache packages by the same author.
Read on 21 November 2026 from GitHub (jaredwray/cacheable), npm (cache-manager), 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