From 2a8615f5706cfa1768832b090f01af7b6c4fa545 Mon Sep 17 00:00:00 2001 From: maskpp Date: Mon, 1 Jul 2024 06:48:39 +0800 Subject: [PATCH] fix comment --- common/lru/lru.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/lru/lru.go b/common/lru/lru.go index 2c32b4de98..a3f93e9cea 100644 --- a/common/lru/lru.go +++ b/common/lru/lru.go @@ -48,8 +48,8 @@ func (c *Cache[K, V]) Contains(key K) bool { // Get retrieves a value from the cache. This marks the key as recently used. func (c *Cache[K, V]) Get(key K) (value V, ok bool) { - c.mu.RLock() - defer c.mu.RUnlock() + c.mu.Lock() + defer c.mu.Unlock() return c.cache.Get(key) }