A multi-engine caching library for Node.js and Express, providing in-memory, file, and Redis backends with a singleton pattern. Current version 2.1.1 (stable, maintenance mode). Released 2022. Differentiators: unified API across engines, Express middleware for route caching, pattern-based cache invalidation, promise-based async operations. Alternatives like node-cache-manager offer more backends but lack Express integration.
npm install cache-allNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes default in-memory cache, sets and gets keys with optional TTL, removes a key, and retrieves all entries.
Replace cache.has(key) with await cache.get(key) !== null
Always await cache.init() at startup before using cache
Use separate cache instances via the factory pattern or use different libraries for different engines
Call cache.init({...}) before any cache operations.Use correct import path (e.g., 'cache-all/redis') and ensure init is awaited.