From ddf6e62e5ab7a4c4b94034ea9a4667c8461fcfa9 Mon Sep 17 00:00:00 2001 From: xing Date: Sat, 28 Oct 2023 00:08:04 +0800 Subject: [PATCH] fix --- cache/map.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache/map.go b/cache/map.go index 12fb770..2a2e631 100644 --- a/cache/map.go +++ b/cache/map.go @@ -132,8 +132,8 @@ func (m *MapCache[K, V]) GetCacheBatch(c context.Context, key []K, timeout time. var res []V ver := 0 needFlush := slice.FilterAndMap(key, func(k K) (r K, ok bool) { - ver += m.Ver(c, k) if _, ok := m.Get(c, k); !ok { + ver += m.Ver(c, k) return k, true } return