From a9a1815227a59d8100251fcbee3cc4901435ed9c Mon Sep 17 00:00:00 2001 From: "Chase, Justin M" Date: Wed, 13 Nov 2024 16:33:23 -0600 Subject: [PATCH] bad negation in cache --- src/util/cache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/cache.ts b/src/util/cache.ts index 91f131f..eacbca7 100644 --- a/src/util/cache.ts +++ b/src/util/cache.ts @@ -18,7 +18,7 @@ export class MemoryCache { refresh: () => Promise, ttl: number = 60000, ): Promise { - if (!this.cache.has(key)) { + if (this.cache.has(key)) { return this.cache.get(key)!.value as T; } else { const value = await refresh();