Cache manager module for the Nest framework (Node.js), providing caching support in server-side applications. It is described as a drop-in replacement for the deprecated CacheModule, and useful if you want to use Nest’s caching features with the cache-manager package.
Project status
- Actively maintained: the upstream was pushed today, and updates landed on October 27 and October 8.
- Recent updates have been fairly frequent, with several in 2026, though the history shown does not establish a fixed cadence.
AI summary generated
Recent updates
12.0.4
Release 12.0.4 fixes CacheInterceptor behavior so streaming responses are not cached. The implementation skips StreamableFile values, web Response objects, and non-thenable async iterables while continuing to cache ordinary values.
12.0.3
Release 12.0.3 fixes cache-store shutdown timing so stores are disconnected after the HTTP server has closed, allowing in-flight requests to continue using the cache. The diff also updates development dependencies and package/release metadata; it shows no changes to runtime dependencies, exported APIs, or declared peer dependencies.
12.0.2
Version 12.0.2 fixes two CacheInterceptor behaviors: server-sent event handlers now bypass caching, and the x-cache header is only set for HTTP contexts. The code also updates development dependencies and adjusts ignore rules; no consumer-facing breaking change is evident.
12.0.1
Release 12.0.1 includes a cache behavior fix related to how module-level namespace is applied to existing Keyv-backed cache stores. The code change ensures that when a Keyv instance store is provided, it gets the module namespace (unless the Keyv instance already has a custom namespace).
Breaking12.0.0
Release 12.0.0 makes `@nestjs/cache-manager` an ESM-only package aligned with the Nest 12 release line. The published entrypoint is now driven by a strict `exports` map and the legacy root shims are removed, enforcing a newer Node.js runtime via `engines`.
Breaking3.1.3
Release 3.1.3 contains a targeted fix related to detecting Keyv cache stores when building with SWC. The code change replaces an instanceof-based Keyv check with a more resilient runtime type guard and adds an e2e test to ensure Keyv-like foreign instances are preserved.
3.1.2
Release 3.1.2 is a small change that addresses a trackBy API regression related to the cache interceptor. The only functional code change is in CacheInterceptor.trackBy in lib/interceptors/cache.interceptor.ts.
3.1.1
Release 3.1.1 introduces support for asynchronous cache-key factories. The code changes go beyond the note by also adjusting the cache-key factory types (including allowing undefined) and changing the interceptor internals to await key computation.
Features3.1.0
Release 3.1.0 adds support for passing a Cacheable instance into the cache module, specifically preserving Cacheable nonBlocking behavior. It also extends the CacheKey decorator to accept a factory function that is evaluated from the current ExecutionContext.
Features3.0.1
Release 3.0.1 is primarily a dependency metadata update, with the release notes calling out a single change: adding keyv to peerDependencies. The actual diff shows no library source code changes, but it does include CI configuration changes, documentation badge removal, and substantial devDependency/tooling updates reflected in package-lock.json.
Breaking3.0.0
Release 3.0.0 refactors @nestjs/cache-manager to work with cache-manager v6 and uses Keyv-based stores. While the release notes mention Keyv migration broadly, the code diff shows several additional breaking API and typing changes around how stores and TTL are configured.
BreakingFeatures2.3.0
Release 2.3.0 primarily adds HTTP cache hit/miss visibility via response headers and includes the related test coverage. The diff also introduces new cache configuration options around background refresh behavior and error handling, plus a number of dependency and test infrastructure updates.
Features2.2.2
Release 2.2.2 primarily bumps development and Nest monorepo dependencies, and includes a targeted fix related to async cache module configuration. The actual code change modifies the public TypeScript types behind CacheModuleAsyncOptions and related async factories, impacting which option fields are permitted.
2.2.1
Release 2.2.1 primarily updates the repository’s development and tooling dependencies (Nest monorepo, TypeScript-ESLint, prettier, husky, test tooling), and updates the lockfile accordingly. It also removes reflect-metadata from the package peerDependencies while still using reflect-metadata in devDependencies, which is the only change that could affect downstream consumers’ dependency resolution.
Breaking2.2.0
Release 2.2.0 updates the package to NestJS 10.3.0 and newer tooling (TypeScript, eslint, commitlint, Node types), along with cache-manager dependency updates. In code, it adds an exported Cache provider token that aliases the existing CACHE_MANAGER provider, and it improves cache error logging by including stack traces. The release also adds new e2e tests covering default TTL behavior.
Features