boolean requestHeadersMatch(final HttpRequest request, final HttpCacheEntry entry) {
        final Iterator<Header> it = entry.headerIterator(HttpHeaders.VARY);
        if (it.hasNext()) {
            final Set<String> headerNames = new HashSet<>();
            while (it.hasNext()) {
                final Header header = it.next();
                MessageSupport.parseTokens(header, e -> {
                    headerNames.add(e.toLowerCase(Locale.ROOT));
                });
            }
            final List<String> tokensInRequest = new ArrayList<>();
            final List<String> tokensInCache = new ArrayList<>();
            for (final String headerName: headerNames) {
                if (headerName.equalsIgnoreCase("*")) {
                    return false;
                }
                CacheKeyGenerator.normalizeElements(request, headerName, tokensInRequest::add);
                CacheKeyGenerator.normalizeElements(entry.requestHeaders(), headerName, tokensInCache::add);
                if (!Objects.equals(tokensInRequest, tokensInCache)) {
                    return false;
                }
            }
        }
        return true;
    }
Determine if I can utilize the given {@link HttpCacheEntry} to respond to the given
{@link HttpRequest}.

@since 5.4
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachedResponseSuitabilityChecker.java