• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/data/cacheengine.php
  • Класс: BitrixMainDataCacheEngine
  • Вызов: CacheEngine::getBaseDirVersion
protected function getBaseDirVersion($baseDir) : string
{
	$baseDirHash = sha1($baseDir);
	$key = $this->sid . '|base_dir|' . $baseDirHash;

	if (!isset(static::$baseDirVersion[$key]))
	{
		static::$baseDirVersion[$key] = $this->get($key);
	}

	if (static::$baseDirVersion[$key] === false)
	{
		static::$baseDirVersion[$key] = sha1($baseDirHash . '|' . mt_rand() . '|' . microtime());
		$this->set($key, 0, static::$baseDirVersion[$key]);
	}

	return static::$baseDirVersion[$key];
}