This commit is contained in:
xing 2023-10-28 00:08:04 +08:00
parent e502f581e1
commit ddf6e62e5a

2
cache/map.go vendored
View File

@ -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