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

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

	if (isset($_SESSION["SESS_SHOW_TIME_EXEC"]) && ($_SESSION["SESS_SHOW_TIME_EXEC"] == 'Y'))
	{
		return false;
	}
	elseif (isset($_SESSION["SHOW_SQL_STAT"]) && ($_SESSION["SHOW_SQL_STAT"] == 'Y'))
	{
		return false;
	}
	elseif (isset($_SESSION["SHOW_CACHE_STAT"]) && ($_SESSION["SHOW_CACHE_STAT"] == 'Y'))
	{
		return false;
	}

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

	return false;
}