mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
fix comment
This commit is contained in:
parent
5fc20d4e63
commit
2a8615f570
1 changed files with 2 additions and 2 deletions
|
|
@ -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.
|
// 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) {
|
func (c *Cache[K, V]) Get(key K) (value V, ok bool) {
|
||||||
c.mu.RLock()
|
c.mu.Lock()
|
||||||
defer c.mu.RUnlock()
|
defer c.mu.Unlock()
|
||||||
|
|
||||||
return c.cache.Get(key)
|
return c.cache.Get(key)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue