ts-cache-mongoose

JSON →
library 2.2.1 ·javascript
verified Jun 7, 2026

v2.2.1 — Mongoose query and aggregate caching plugin supporting in-memory and Redis backends. Integrates via a .cache() method on Mongoose Query and Aggregate instances, with configurable TTL by string or number (seconds). Peer dependencies: mongoose (6.6-9.x), bson, and optional @nestjs/common. Tested against mongoose 6.12.2, 7.6.4, 8.23.0, and 9.4.1. Key differentiator: minimal API surface, ESM + CJS, TypeScript-first, with built-in bounded in-memory cache option.