MongoDB store for node-cache-manager (v0.3.0). This package integrates MongoDB as a persistent caching backend for the node-cache-manager module. It provides a simple API for get, set, del, and wrap operations with full Promise support. The store supports configurable collection names, compression, pool size, and auto-reconnect. Unlike in-memory or Redis stores, it leverages MongoDB for durable, shared caching across multiple processes or servers. The package has low release activity and is considered stable but not actively developed.
npm install cache-manager-mongodbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a MongoDB-backed cache store, set, get, and delete a value using Promises.
Replace callbacks with .then()/.catch() or use async/await.
Install @types/cache-manager-mongodb if available, or declare module manually.
Ensure URI contains username:password@host:port/dbname.
Consider alternatives like cache-manager-ioredis or cache-manager-mongoose.
Provide options.collection as a string: { collection: 'myCache' }Use cacheManager.caching({ store: mongoStore, ... })