From 9e11d69a8ade6fae07676d49f6a2cb4697705107 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Thu, 9 Feb 2023 08:48:50 -0600 Subject: [PATCH] Fix bug where allowStale couldn't be disabled --- server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.ts b/server.ts index 478a4c0ec1..ba0c8fd7b2 100644 --- a/server.ts +++ b/server.ts @@ -324,7 +324,7 @@ function initCache() { botCache = new LRU( { max: environment.cache.serverSide.botCache.max, ttl: environment.cache.serverSide.botCache.timeToLive || 24 * 60 * 60 * 1000, // 1 day - allowStale: environment.cache.serverSide.botCache.allowStale || true // if object is stale, return stale value before deleting + allowStale: environment.cache.serverSide.botCache.allowStale ?? true // if object is stale, return stale value before deleting }); } @@ -335,7 +335,7 @@ function initCache() { anonymousCache = new LRU( { max: environment.cache.serverSide.anonymousCache.max, ttl: environment.cache.serverSide.anonymousCache.timeToLive || 10 * 1000, // 10 seconds - allowStale: environment.cache.serverSide.anonymousCache.allowStale || true // if object is stale, return stale value before deleting + allowStale: environment.cache.serverSide.anonymousCache.allowStale ?? true // if object is stale, return stale value before deleting }); } }