• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/scrum/service/cacheservice.php
  • Класс: BitrixTasksScrumServiceCacheService
  • Вызов: CacheService::__construct
public function __construct(int $id, string $typeId, ?string $extraKey = null)
{
	$this->cache = new CPHPCache;

	if (!isset($this->map[$typeId]))
	{
		throw new ArgumentNullException('An unsupported type was passed');
	}

	$this->cacheTime = $this->map[$typeId]['time'];
	$this->cacheId = $this->map[$typeId]['id'] . $id;
	$this->cacheDir = $this->map[$typeId]['dir'] . $id;

	if (isset($this->map[$typeId]['rootDir']))
	{
		$this->rootDir = $this->map[$typeId]['dir'] . $id;
	}

	if ($extraKey)
	{
		$this->cacheId = $this->cacheId . '-' . $extraKey;
		$this->cacheDir = $this->cacheDir . '/' . $extraKey;
	}
}