From 3f3187de0f62107da19d9341aebd1d8414bff0ea Mon Sep 17 00:00:00 2001 From: Bjørn Erik Pedersen Date: Thu, 27 Dec 2018 12:05:42 +0100 Subject: cache/namedmemcache: Fix data race --- cache/namedmemcache/named_cache.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'cache') diff --git a/cache/namedmemcache/named_cache.go b/cache/namedmemcache/named_cache.go index 18fbea391..d8c229a01 100644 --- a/cache/namedmemcache/named_cache.go +++ b/cache/namedmemcache/named_cache.go @@ -68,11 +68,6 @@ func (c *Cache) GetOrCreate(key string, create func() (interface{}, error)) (int c.nlocker.Lock(key) defer c.nlocker.Unlock(key) - // Double check - if entry, found := c.cache[key]; found { - return entry.value, entry.err - } - // Create it. value, err := create() -- cgit v1.2.3