protected function log($status, CacheKey $k, $lifetime = 0)
{
static::$summary[$status]++;
if ($this->should_log == false) {
return;
}
$bt = debug_backtrace();
foreach ($bt as $i => $d) {
if (strpos($d['file'], '/Cache') === false) {
// TODO: if() may not work well if user has a file called Cache
$trace = $d['function'] . ' at ' . $d['file'] . ':' . $d['line'];
$this->cache_log[] = array('status' => $status, 'message' => "(" . $k->debug() . ", {$lifetime}) by " . $trace);
break;
}
}
}