From c103283766f922a9f0e89985b22b5fc267f9d984 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 7 Apr 2025 08:50:22 +0200 Subject: [PATCH] feat(assist-server): use int ttl for cache --- ee/assist-server/app/cache.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/assist-server/app/cache.js b/ee/assist-server/app/cache.js index 8a07e08dc..0a89c7d44 100644 --- a/ee/assist-server/app/cache.js +++ b/ee/assist-server/app/cache.js @@ -15,8 +15,8 @@ function generateNodeID() { const PING_INTERVAL = parseInt(process.env.PING_INTERVAL_SECONDS) || 25; const CACHE_REFRESH_INTERVAL = parseInt(process.env.CACHE_REFRESH_INTERVAL_SECONDS) || 10; -const pingInterval = PING_INTERVAL + PING_INTERVAL/2; -const cacheRefreshInterval = CACHE_REFRESH_INTERVAL + CACHE_REFRESH_INTERVAL/2; +const pingInterval = Math.floor(PING_INTERVAL + PING_INTERVAL/2); +const cacheRefreshInterval = Math.floor(CACHE_REFRESH_INTERVAL + CACHE_REFRESH_INTERVAL/2); const cacheRefreshIntervalMs = CACHE_REFRESH_INTERVAL * 1000; let lastCacheUpdateTime = 0; let cacheRefresher = null;