• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/bitrix24disk/legacy/newdiskstorage.php
  • Класс: BitrixDiskBitrix24DiskLegacyNewDiskStorage
  • Вызов: NewDiskStorage::loadTree
public function loadTree(): void
{
	if ($this->isLoadedTree)
	{
		return;
	}

	$cache = DataCache::createInstance();
	if ($cache->initCache(15768000, 'new_storage_tr_' . $this->storage->getId(), 'disk'))
	{
		$cachedVars = $cache->getVars();
		$this->treeData = $cachedVars[0];
		if (isset($cachedVars[1]))
		{
			$this->treeVersion = $cachedVars[1];
		}
	}
	else
	{
		$this->buildTree();

		$cache->startDataCache();
		$cache->endDataCache([$this->treeData, $this->treeVersion]);
	}

	$this->isLoadedTree = true;
}