public function report()
{
if ($this->should_log == false) {
return;
}
echo '<div><h2>Cache RAM system</h2>';
echo '<h3>System is: ' . ($this->enabled ? 'enabled' : 'disabled') . '</h3>';
$stats = array_fill_keys(array_keys(CacheLogEnum::getNames()), 0);
echo '<ul>';
foreach ($this->cache_log as $entry) {
echo '<li>' . CacheLogEnum::getName($entry['status']) . $entry['message'] . '</li>';
$stats[$entry['status']]++;
}
echo '</ul>';
echo '<ul>';
foreach ($stats as $key => $val) {
echo '<li>' . CacheLogEnum::getName($key) . '=' . $val . '</li>';
}
echo '</ul>';
echo '</ul></div>';
}