• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/composite/page.php
  • Класс: BitrixMainCompositePage
  • Вызов: Page::isCacheable
public function isCacheable()
{
	if ($this->storage === null)
	{
		return false;
	}

	if ($this->cacheProvider !== null && $this->cacheProvider->isCacheable() === false)
	{
		return false;
	}

	if (isset(BitrixMainApplication::getInstance()->getKernelSession()["SESS_SHOW_TIME_EXEC"]) && (BitrixMainApplication::getInstance()->getKernelSession()["SESS_SHOW_TIME_EXEC"] == 'Y'))
	{
		return false;
	}
	elseif (isset(BitrixMainApplication::getInstance()->getKernelSession()["SHOW_SQL_STAT"]) && (BitrixMainApplication::getInstance()->getKernelSession()["SHOW_SQL_STAT"] == 'Y'))
	{
		return false;
	}
	elseif (isset(BitrixMainApplication::getInstance()->getKernelSession()["SHOW_CACHE_STAT"]) && (BitrixMainApplication::getInstance()->getKernelSession()["SHOW_CACHE_STAT"] == 'Y'))
	{
		return false;
	}

	$httpStatus = intval(CHTTP::GetLastStatus());
	if ($httpStatus == 200 || $httpStatus === 0)
	{
		return $this->canCache;
	}

	return false;
}