$ci) { $class = $cycleClass->next(); echo << TR; $pvalue = (int) ($ci['avail'] / $ci['size'] * 100); $pempty = 100 - $pvalue; if ($config['percent_graph_type'] == 'used') { // swap $tmp = $pvalue; $pvalue = $pempty; $pempty = $tmp; } $w = $config['percent_graph_width'] + 2; if (empty($ci['istotal'])) { $graph = freeblock_to_graph($ci['free_blocks'], $ci['size']); $blocksgraph = "
{$graph}
"; } else { $blocksgraph = ''; } $ci_slots = size($ci['slots']); $ci_size = size($ci['size']); $ci_avail = size($ci['avail']); $ci = number_formats($ci, $numkeys); $hits_avg_h = number_format(array_avg($ci['hits_by_hour']), 2); $hits_avg_s = number_format(array_avg($ci['hits_by_second']), 2); $hits_graph_h = get_cache_hits_graph($ci, 'hits_by_hour'); if (!empty($ci['istotal'])) { $ci['status'] = '-'; $ci['can_readonly'] = '-'; } else { if ($ci['disabled']) { $ci['status'] = $l_disabled . sprintf("(%s)", age($ci['disabled'])); } else if ($ci['type'] == XC_TYPE_PHP) { $ci['status'] = $ci['compiling'] ? $l_compiling . sprintf("(%s)", age($ci['compiling'])) : $l_normal; } else { $ci['status'] = '-'; } $ci['can_readonly'] = $ci['can_readonly'] ? 'yes' : 'no'; } $enabledisable = $ci['disabled'] ? 'enable' : 'disable'; $l_enabledisable = $ci['disabled'] ? $l_enable : $l_disable; echo <<{$ci['cache_name']} EOS; ?>
{$ci_slots} {$ci_size} {$ci_avail}
{$blocksgraph}
{$ci['status']} {$ci['hits']} {$hits_graph_h} {$hits_avg_h} {$hits_avg_s} {$ci['updates']} {$ci['skips']} {$ci['ooms']} {$ci['errors']} {$ci['can_readonly']} {$ci['cached']} {$ci['deleted']} {$ci['gc']}