Node-RED nodes for in-memory caching with TTL support, version 2.0.3 (stable, last updated 2021). Provides three nodes: a Cache configuration node, a Cache in node for retrieval, and a Cache out node for storage with optional TTL (in seconds). Uses node-cache under the hood, but simplifies the API for Node-RED flows. Supports cache miss routing to a separate output and dumping all cache entries. Maintenance release with minor fixes.
npm install node-red-contrib-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Install package, use Cache in/out nodes in Node-RED flow editor. Key in msg.topic, value in msg.payload.
Enable 'Route on miss' in Cache node config to get miss output. Flows created before 2.0.0 will not automatically have miss routing.
Check for null explicitly in downstream nodes.
Avoid setting Default TTL to 0 in Cache config; use undefined for no expiry.
Create separate Cache config nodes for isolated caches.
Ensure msg.topic is set as the cache key and msg.payload is the value to store.
Use a 'Cache out' node to store the key first, or enable 'Route on miss' to handle misses separately.
Provide TTL as integer seconds in msg.ttl. Default TTL is undefined (never expire).