Skip to content

v2.0.32

Choose a tag to compare

@pankti-shah-1kosmos pankti-shah-1kosmos released this 06 Aug 13:05
· 6 commits to main since this release
213c4ac

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-reset topic
  • 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