cache logging was getting hit/miss the wrong way round... forever?
This commit is contained in:
parent
c8563951ce
commit
8ec3690f8e
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Reference in a new issue