From f841d8173b121db8a245802e14a3df52fab79a66 Mon Sep 17 00:00:00 2001 From: Ajay Date: Mon, 22 Apr 2024 00:53:09 -0400 Subject: [PATCH] Fix ttl cache key not properly cleared --- src/utils/redis.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/redis.ts b/src/utils/redis.ts index e158250..05c1b99 100644 --- a/src/utils/redis.ts +++ b/src/utils/redis.ts @@ -410,7 +410,7 @@ async function setupCacheClientListener(cacheClient: RedisClientType, lastInvalidation = Date.now(); } - ttlCache.get(key); + ttlCache.delete(key); // To tell it to not save the result of this currently running request if (key && activeRequestPromises[key] !== undefined) {