• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/composite/responder.php
  • Класс: BitrixMainCompositeMemcachedResponse
  • Вызов: MemcachedResponse::getClusterServers
static function getClusterServers($groupId)
{
	$arServers = array();

	$arList = false;
	if (file_exists($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/cluster/memcache.php"))
	{
		include($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/cluster/memcache.php");
	}

	if (defined("BX_MEMCACHE_CLUSTER") && is_array($arList))
	{
		foreach ($arList as $arServer)
		{
			if ($arServer["STATUS"] === "ONLINE" && $arServer["GROUP_ID"] == $groupId)
			{
				$arServers[] = $arServer;
			}
		}
	}

	return $arServers;
}