• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/sharing.php
  • Класс: BitrixDiskSharing
  • Вызов: Sharing::cleanCache
static function cleanCache(array $successSharingByEntity)
{
	$storageIds = array();
	foreach($successSharingByEntity as $entity => $sharing)
	{
		if($sharing->getFromEntity() === $sharing->getToEntity())
		{
			continue;
		}

		[$type] = Sharing::parseEntityValue($sharing->getFromEntity());
		if($type != SharingTable::TYPE_TO_USER)
		{
			continue;
		}
		$storageIds[$sharing->getRealStorageId()] = $sharing->getRealStorageId();
	}

	$cache = Cache::createInstance();
	foreach($storageIds as $id)
	{
		$cache->clean('storage_isshared_' . $id, 'disk');
	}
}