public static String buildCacheKey(String uri, Map<?, ?> options) {
        if (uri == null) {
            throw new IllegalArgumentException("Non-null URI required");
        } else if ((uri = uri.trim()).isEmpty()) {
            throw new IllegalArgumentException("Non-blank URI required");
        }
        if (options == null || options.isEmpty()) {
            return uri;
        }

        SortedMap<Object, Object> sorted;
        if (options instanceof SortedMap) {
            sorted = (SortedMap<Object, Object>) options;
        } else {
            sorted = new TreeMap<>();
            for (Entry<?, ?> entry : options.entrySet()) {
                if (entry.getKey() != null) {
                    sorted.put(entry.getKey(), entry.getValue());
                }
            }
        }

        StringBuilder builder = new StringBuilder(uri).append('|');
        for (Entry<Object, Object> entry : sorted.entrySet()) {
            if (entry.getKey() != null) {
                builder.append(entry.getKey()).append('=').append(entry.getValue()).append(',');
            }
        }
        return builder.toString();
    }
Build unique key according to the given base URI and options for caching.

@param uri     non-null URI
@param options options
@return non-empty unique key for caching
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNodes.java