fix comment

This commit is contained in:
maskpp 2024-07-01 06:48:39 +08:00
parent 2a8615f570
commit 48c3ff7ada

View file

@ -77,8 +77,8 @@ func (c *SizeConstrainedCache[K, V]) Add(key K, value V) (evicted bool) {
// Get looks up a key's value from the cache. // Get looks up a key's value from the cache.
func (c *SizeConstrainedCache[K, V]) Get(key K) (V, bool) { func (c *SizeConstrainedCache[K, V]) Get(key K) (V, bool) {
c.lock.RLock() c.lock.Lock()
defer c.lock.RUnlock() defer c.lock.Unlock()
return c.lru.Get(key) return c.lru.Get(key)
} }