private AuthScheme loadFromCache(final HttpHost host,
                                     final String pathPrefix,
                                     final HttpClientContext clientContext) {
        final AuthCache authCache = clientContext.getAuthCache();
        if (authCache != null) {
            final AuthScheme authScheme = authCache.get(host, pathPrefix);
            if (authScheme != null) {
                if (LOG.isDebugEnabled()) {
                    final String exchangeId = clientContext.getExchangeId();
                    LOG.debug("{} Re-using cached '{}' auth scheme for {}{}", exchangeId, authScheme.getName(), host,
                            pathPrefix != null ? pathPrefix : "");
                }
                return authScheme;
            }
        }
        return null;
    }
Utility class that implements commons aspects of the client side authentication cache keeping.

@since 5.2
httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/AuthCacheKeeper.java