Repository navigation
v2.0.32
·
6 commits
to main
since this release
Tag: v2.0.32
Release Notes:
v2.0.32 — Distributed Cache Flush
New Modules
CacheRegistry.js
- Tracks all NodeCache instances across the service for centralized flush
- Patches node-cache constructor at startup to auto-capture every instance
flushAll()clears all tracked caches in one call
CacheResetListener.js
- Kafka consumer that listens on
platform-cache-resettopic - Fan-out delivery: every pod receives every flush signal
- Validates source (
caas) and replay window (30s) - Calls
CacheRegistry.flushAll()on valid signal
Usage
// First line of service entry point
require('blockid-nodejs-helpers/CacheRegistry');
// After Kafka config is available
const CacheResetListener = require('blockid-nodejs-helpers/CacheResetListener');
await CacheResetListener.initialize({ kafkaConfig, serviceName, logger });
Trigger
GET /caas/environment?resetCaching=true