From 8ec3690f8e92804a03e97670ca4e139ccccfed3b Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 7 Jul 2019 14:07:11 +0100 Subject: [PATCH] cache logging was getting hit/miss the wrong way round... forever? --- core/cacheengine.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/cacheengine.php b/core/cacheengine.php index b2a4acc6..002b10b4 100644 --- a/core/cacheengine.php +++ b/core/cacheengine.php @@ -191,15 +191,15 @@ class Cache global $_tracer; $_tracer->begin("Cache Query", ["key"=>$key]); $val = $this->engine->get($key); - $hit = $val === false ? "hit" : "miss"; - $_tracer->end(null, ["result"=>$hit]); if ($val !== false) { + $res = "hit"; $this->hits++; - return $val; } else { + $res = "miss"; $this->misses++; - return false; } + $_tracer->end(null, ["result"=>$res]); + return $val; } public function set(string $key, $val, int $time=0)