• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/stack_cache_entry.php
  • Класс: CStackCacheEntry
  • Вызов: CStackCacheEntry::Save
function Save()
{
	if (defined("BITRIX_SKIP_STACK_CACHE") && BITRIX_SKIP_STACK_CACHE)
		return;

	global $DB;

	if(
		!$this->cleanSet
		|| (
			!$this->cleanGet
			&& (count($this->values) >= $this->len)
		)
	)
	{
		$objCache = BitrixMainDataCache::createInstance();

		//Force cache rewrite
		$objCache->forceRewriting(true);

		if($objCache->startDataCache($this->ttl, $this->entity, $DB->type."/".$this->entity, $this->values, "stack_cache"))
		{
			$objCache->endDataCache();
		}

		$this->cleanGet = true;
		$this->cleanSet = true;
	}
}