From 9dbb3394b80553800b04af4c0210f69a208ce8d7 Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com> Date: Sat, 13 Apr 2024 07:01:59 +0200 Subject: [PATCH] Fix lru cache Get returning opposite --- utils/cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/cache.go b/utils/cache.go index c20cae8..68af609 100644 --- a/utils/cache.go +++ b/utils/cache.go @@ -29,7 +29,7 @@ func NewLRUCache[K comparable, T any](size int) *LRUCache[K, T] { } func (c *LRUCache[K, T]) Get(key K) (value T, ok bool) { - if value, ok = c.values.Load().Get(key); !ok { + if value, ok = c.values.Load().Get(key); ok { c.hits.Add(1) return value, true } else {