simple-cluster-cache is a dead-simple in-memory cache for Node.js cluster applications, enabling shared caching between master and worker processes via IPC. Version 0.0.6 is the latest release. It provides basic get/set/del/clear methods with optional TTL and callback support, and supports both single-key and multi-key operations. It is designed specifically for the Node.js cluster module and does not require external dependencies like Redis or Memcached. The package has not seen updates since its initial release and has limited adoption.
npm install simple-cluster-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets a cache entry in the master process and retrieves it in a worker process, demonstrating shared cache across cluster.
Always provide a callback to retrieve the cached value. cache.get('key', (err, val) => { console.log(val); });Consider using a maintained alternative like node-cache-manager or built-in cluster IPC.
Handle the result as an object: cache.get(['key1', 'key2'], (err, result) => { console.log(result.key1); });Use default import: import cache from 'simple-cluster-cache';
Provide a callback function as the last argument: cache.get('key', (err, val) => {});No dependency data recorded yet.