$cache_type = GetMessage("PERFMON_PANEL_CACHE_STORAGE_MEMCACHE"); break; case "cacheengineapc": $cache_type = GetMessage("PERFMON_PANEL_CACHE_STORAGE_APC"); break; case "cacheenginexcache": $cache_type = GetMessage("PERFMON_PANEL_CACHE_STORAGE_XCACHE"); break; case "cacheenginefiles": $cache_type = GetMessage("PERFMON_PANEL_CACHE_STORAGE_FILES"); break; case "cacheenginememcachecluster": $cache_type = GetMessage("PERFMON_PANEL_CACHE_STORAGE_CLUSTER"); break; default: $cache_type = \Bitrix\Main\Data\Cache::getCacheEngineType(); break; } ?> <td class="bx-digit-cell"><?php echo $cache_type; ?> </td> <td><?php echo GetMessage("PERFMON_PANEL_CACHE_STORAGE_REC"); ?> </td> </tr> <tr> <td nowrap><?php echo GetMessage("PERFMON_PANEL_MANAGED_CACHE");
function GetParams() { $res = array("enabled" => array(array("PARAMETER" => 'eaccelerator.enable', "VALUE" => ini_get('eaccelerator.enable'), "RECOMMENDATION" => GetMessage("PERFMON_MEASURE_SET_REC", array("#value#" => "1")))), "cache_ttl" => array(array("PARAMETER" => 'eaccelerator.shm_ttl', "VALUE" => ini_get('eaccelerator.shm_ttl'), "RECOMMENDATION" => GetMessage("PERFMON_MEASURE_GREATER_THAN_ZERO_REC"))), "check_mtime" => array(array("PARAMETER" => 'eaccelerator.check_mtime', "VALUE" => ini_get('eaccelerator.check_mtime'), "RECOMMENDATION" => GetMessage("PERFMON_MEASURE_SET_REC", array("#value#" => "1")))), "memory_pct" => array(array("PARAMETER" => 'eaccelerator.shm_size (' . GetMessage("PERFMON_MEASURE_CURRENT_VALUE", array("#value#" => ini_get('eaccelerator.shm_size'))) . ')', "VALUE" => ini_get('eaccelerator.shm_size'), "RECOMMENDATION" => GetMessage("PERFMON_MEASURE_EQUAL_OR_GREATER_THAN_REC", array("#value#" => "40"))))); if (\Bitrix\Main\Data\Cache::getCacheEngineType() == "cacheengineeaccelerator") { $res["cache_limit"] = array(array("PARAMETER" => 'eaccelerator.shm_max', "VALUE" => ini_get('eaccelerator.shm_max'), "RECOMMENDATION" => GetMessage("PERFMON_MEASURE_GREATER_THAN_ZERO_REC"))); } return $res; }
if (@unlink($file)) { $_SESSION["CACHE_STAT"]["deleted"]++; $_SESSION["CACHE_STAT"]["space_freed"] += $file_size; $space_freed += $file_size; } else { $_SESSION["CACHE_STAT"]["errors"]++; } if (time() >= $endTime) { break; } } //no more than 200 files per second usleep(5000); } CHTMLPagesCache::writeStatistic(0, 0, 0, 0, -$space_freed); } elseif (\Bitrix\Main\Data\Cache::getCacheEngineType() == "cacheenginefiles") { $obCacheCleaner->Start(); while ($file = $obCacheCleaner->GetNextFile()) { if (is_string($file)) { $date_expire = $obCacheCleaner->GetFileExpiration($file); if ($date_expire) { $file_size = filesize($file); $_SESSION["CACHE_STAT"]["scanned"]++; $_SESSION["CACHE_STAT"]["space_total"] += $file_size; if ($bDoNotCheckExpiredDate || $date_expire < $curentTime) { if (@unlink($file)) { $_SESSION["CACHE_STAT"]["deleted"]++; $_SESSION["CACHE_STAT"]["space_freed"] += $file_size; } else { $_SESSION["CACHE_STAT"]["errors"]++; }