aboutsummaryrefslogtreecommitdiffhomepage
path: root/cache
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2018-12-27 12:05:42 +0100
committerBjørn Erik Pedersen <[email protected]>2018-12-27 12:05:42 +0100
commit3f3187de0f62107da19d9341aebd1d8414bff0ea (patch)
treeeb679ae9d07a89b7cd7746e059512270838966b2 /cache
parentcc351958e12d4dc83f664a1d51be76a447fea9b8 (diff)
downloadhugo-3f3187de0f62107da19d9341aebd1d8414bff0ea.tar.gz
hugo-3f3187de0f62107da19d9341aebd1d8414bff0ea.zip
cache/namedmemcache: Fix data race
Diffstat (limited to 'cache')
-rw-r--r--cache/namedmemcache/named_cache.go5
1 files changed, 0 insertions, 5 deletions
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()