• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/service/geoip/manager.php
  • Класс: BitrixMainServiceGeoIpManager
  • Вызов: Manager::getFromStore
static function getFromStore(WebIpAddress $ipAddress, string $handler): array
{
	$cacheTtl = static::getCacheTtl();

	if ($cacheTtl > 0)
	{
		$cache = Application::getInstance()->getManagedCache();
		$cacheId = static::getCacheId($ipAddress, $handler);

		if ($cache->read($cacheTtl, $cacheId, self::CACHE_DIR))
		{
			$records = $cache->get($cacheId);

			if (is_array($records))
			{
				return $records;
			}
		}
	}

	return [];
}