s/Context/EventTracer/g

This commit is contained in:
Shish
2019-07-05 20:49:47 +01:00
parent f0326dc3ab
commit ccb9c493d5
10 changed files with 63 additions and 58 deletions

View File

@ -188,11 +188,14 @@ class Cache
public function get(string $key)
{
global $_tracer;
$_tracer->begin("Cache Query", null, ["key"=>$key]);
$val = $this->engine->get($key);
if ((DEBUG_CACHE === true) || (is_null(DEBUG_CACHE) && @$_GET['DEBUG_CACHE'])) {
$hit = $val === false ? "hit" : "miss";
file_put_contents("data/cache.log", "Cache $hit: $key\n", FILE_APPEND);
}
$_tracer->end();
if ($val !== false) {
$this->hits++;
return $val;