• Модуль: location
  • Путь к файлу: ~/bitrix/modules/location/lib/repository/location/cache.php
  • Класс: BitrixLocationRepositoryLocationCache
  • Вызов: Cache::save
public function save(Location $location): Result
{
	$index = $this->pool->getItemsCount();
	$this->pool->addItem($index, $location);
	$languageId = $location->getLanguageId();

	if($locationId = $location->getId())
	{
		$tmpIndex = $this->createIdIndex($locationId, $languageId);
		$this->idMap[$tmpIndex] = $index;
	}

	if($externalId = $location->getExternalId())
	{
		$sourceCode = $location->getSourceCode();
		$tmpIndex = $this->createExternalIdIndex($externalId, $sourceCode, $languageId);
		$this->externalIdMap[$tmpIndex] = $index;
	}

	$this->isItemChanged = true;
	return new Result();
}