From f87d9d1dda72bfe980e4eeaf6445d3df712dd568 Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 6 Nov 2020 12:13:28 +0800 Subject: [PATCH] refine code style --- core/stores/cache/cachenode.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/stores/cache/cachenode.go b/core/stores/cache/cachenode.go index d09260f1..06af3c06 100644 --- a/core/stores/cache/cachenode.go +++ b/core/stores/cache/cachenode.go @@ -175,12 +175,12 @@ func (c cacheNode) doTake(v interface{}, key string, query func(v interface{}) e } if fresh { return nil - } else { - // got the result from previous ongoing query - c.stat.IncrementTotal() - c.stat.IncrementHit() } + // got the result from previous ongoing query + c.stat.IncrementTotal() + c.stat.IncrementHit() + return jsonx.Unmarshal(val.([]byte), v) }