private void initializeSlotsCache(Set<HostAndPort> startNodes,
	    GenericObjectPoolConfig poolConfig) {
	for (HostAndPort hostAndPort : startNodes) {
	    JedisPool jp = new JedisPool(poolConfig, hostAndPort.getHost(),
		    hostAndPort.getPort());

	    Jedis jedis = null;
	    try {
		jedis = jp.getResource();
		cache.discoverClusterNodesAndSlots(jedis);
		break;
	    } catch (JedisConnectionException e) {
		// try next nodes
	    } finally {
		if (jedis != null) {
		    jedis.close();
		}
	    }
	}

	for (HostAndPort node : startNodes) {
	    cache.setNodeIfNotExist(node);
	}
    }