From 46e9a5d96b929072dd4ac07fd0a335cccd1372b5 Mon Sep 17 00:00:00 2001 From: Felipe Sales Date: Mon, 27 Jan 2025 11:29:23 -0300 Subject: [PATCH] Fix cache metrics --- node/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/index.ts b/node/index.ts index 264aa0e6..3d5675da 100644 --- a/node/index.ts +++ b/node/index.ts @@ -16,8 +16,7 @@ const SIX_SECONDS_MS = 6 * 1000 const NINE_SECONDS_MS = 9 * 1000 // Segments are small and immutable. -const MAX_SEGMENT_CACHE = 10000 -const segmentCache = new LRUCache({ max: MAX_SEGMENT_CACHE }) +const segmentCache = new LRUCache({ max: 1000 }) const searchCache = new LRUCache({ max: 3000 }) const messagesCache = new LRUCache({ max: 3000 }) const vbaseCache = new LRUCache({ max: 3000 }) @@ -27,6 +26,7 @@ metrics.trackCache('segment', segmentCache) metrics.trackCache('search', searchCache) metrics.trackCache('messages', messagesCache) metrics.trackCache('vbase', vbaseCache) +metrics.trackCache('apps', appsCache) export default new Service({ clients: {