• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/widget/cache.php
  • Класс: BitrixImOpenLinesWidgetCache
  • Вызов: Cache::get
static function get(int $userId, ?string $option = null)
{
	$cache = BitrixMainDataCache::createInstance();

	$result = [];
	if ($cache->initCache(self::$cacheTtl, $userId, self::$cacheDir))
	{
		$result = $cache->getVars();
	}

	if ($option !== null)
	{
		if (
			!empty($result)
			&& is_array($result)
			&& isset($result[$option])
		)
		{
			return $result[$option];
		}
		else
		{
			return null;
		}
	}

	return $result;
}