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

	if($locationId = $location->getId())
	{
		$tmpIndex = $this->createIdIndex($locationId, $languageId);

		if(isset($this->idMap[$tmpIndex]))
		{
			$index = $this->idMap[$tmpIndex];
			unset($this->idMap[$tmpIndex]);
		}
	}

	if($externalId = $location->getExternalId())
	{
		$sourceCode = $location->getSourceCode();
		$tmpIndex = $this->createExternalIdIndex($externalId, $sourceCode, $languageId);

		if(isset($this->externalIdMap[$tmpIndex]))
		{
			if($index === null)
			{
				$index = $this->externalIdMap[$tmpIndex];
			}

			unset($this->externalIdMap[$tmpIndex]);
		}
	}

	if($index)
	{
		$this->pool->deleteItem($index);
	}

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