public static function restoreDebugMode() { global $DB, $APPLICATION; $toRestore = explode("|", constant("PERFMON_STARTED")); $DB->ShowSqlStat = $toRestore[0]; \Bitrix\Main\Data\Cache::setShowCacheStat($toRestore[1]); $APPLICATION->ShowIncludeStat = $toRestore[2]; }
protected function initializeCache() { //TODO: Should be transfered to where GET parameter is defined in future //magic parameters: show cache usage statistics $show_cache_stat = ""; if (isset($_GET["show_cache_stat"])) { $show_cache_stat = strtoupper($_GET["show_cache_stat"]) == "Y" ? "Y" : ""; @setcookie("show_cache_stat", $show_cache_stat, false, "/"); } elseif (isset($_COOKIE["show_cache_stat"])) { $show_cache_stat = $_COOKIE["show_cache_stat"]; } Data\Cache::setShowCacheStat($show_cache_stat === "Y"); if (isset($_GET["clear_cache_session"])) { Data\Cache::setClearCacheSession($_GET["clear_cache_session"] === 'Y'); } if (isset($_GET["clear_cache"])) { Data\Cache::setClearCache($_GET["clear_cache"] === 'Y'); } }