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),