• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/data/statichtmlcache.php
  • Класс: BitrixMainDataStaticHtmlCache
  • Вызов: StaticHtmlCache::writeDebug
private function writeDebug()
{
	if (!$this->debugEnabled || !defined("BX_COMPOSITE_DEBUG") || BX_COMPOSITE_DEBUG !== true || !$this->storage->exists())
	{
		return;
	}

	if (!$this->storage->shouldCountQuota() || CHTMLPagesCache::checkQuota())
	{
		//temporary check
		if ($this->storage instanceof StaticHtmlFileStorage)
		{
			$cacheFile = $this->storage->getCacheFile();
			$backupName = $cacheFile->getPath().".delete.".microtime(true);
			AddMessage2Log($backupName, "composite");
			$backupFile = new MainIOFile($backupName);
			$backupFile->putContents($cacheFile->getContents());
			CHTMLPagesCache::writeStatistic(0, 0, 0, 0, $cacheFile->getSize());
		}
		else
		{
			AddMessage2Log($this->cacheKey." was deleted", "composite");
		}
	}
	else
	{
		AddMessage2Log($this->cacheKey."(quota exceeded)", "composite");
	}
}