From 15416e03f5a287e524d7ae63207e04e402777ea4 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Wed, 13 Sep 2023 16:08:30 -0700 Subject: [PATCH] nit Signed-off-by: Kevin Su --- cache/auto_refresh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache/auto_refresh.go b/cache/auto_refresh.go index c786de6..1d1a1f0 100644 --- a/cache/auto_refresh.go +++ b/cache/auto_refresh.go @@ -219,7 +219,7 @@ func (w *autoRefresh) enqueueBatches(ctx context.Context) error { // If not ok, it means evicted between the item was evicted between getting the keys and this update loop // which is fine, we can just ignore. if value, ok := w.lruMap.Peek(k); ok { - if item, ok := value.(Item); ok && !item.IsTerminal() { + if item, ok := value.(Item); !ok || (ok && !item.IsTerminal()) { snapshot = append(snapshot, itemWrapper{ id: k.(ItemID), item: value.(Item),