fix comment

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

View file

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