diff options
Diffstat (limited to 'cache/namedmemcache/named_cache.go')
-rw-r--r-- | cache/namedmemcache/named_cache.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cache/namedmemcache/named_cache.go b/cache/namedmemcache/named_cache.go index 4e912bf58..7fb4fe8ed 100644 --- a/cache/namedmemcache/named_cache.go +++ b/cache/namedmemcache/named_cache.go @@ -30,7 +30,7 @@ type Cache struct { } type cacheEntry struct { - value interface{} + value any err error } @@ -55,7 +55,7 @@ func (c *Cache) Clear() { // create will be called and cached. // This method is thread safe. It also guarantees that the create func for a given // key is invoked only once for this cache. -func (c *Cache) GetOrCreate(key string, create func() (interface{}, error)) (interface{}, error) { +func (c *Cache) GetOrCreate(key string, create func() (any, error)) (any, error) { c.mu.RLock() entry, found := c.cache[key] c.mu.RUnlock() |