public String generateVariantKey(final HttpRequest request, final HttpCacheEntry entry) {
        if (entry.containsHeader(HttpHeaders.VARY)) {
            final List<String> variantNames = variantNames(entry);
            return generateVariantKey(request, variantNames);
        }
        return null;
    }
Computes a "variant key" from the headers of the given request if the given
cache entry can have variants ({@code Vary} header is present).

@param request originating request
@param entry cache entry
@return variant key if the given cache entry can have variants, {@code null} otherwise.
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CacheKeyGenerator.java