protected boolean isHeuristicallyCacheable(final ResponseCacheControl cacheControl,
                                               final int status,
                                               final Instant responseDate,
                                               final Instant responseExpires) {
        if (isKnownCacheableStatusCode(status)) {
            final Duration freshnessLifetime = calculateFreshnessLifetime(cacheControl, responseDate, responseExpires);
            // calculate freshness lifetime
            if (freshnessLifetime.isNegative()) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Freshness lifetime is invalid");
                }
                return false;
            }
            // If the 'immutable' directive is present and the response is still fresh,
            // then the response is considered cacheable without further validation
            if (cacheControl.isImmutable() && responseIsStillFresh(responseDate, freshnessLifetime)) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Response is immutable and fresh, considered cacheable without further validation");
                }
                return true;
            }
            if (freshnessLifetime.compareTo(Duration.ZERO) > 0) {
                return true;
            }
        } else if (isUnknownStatusCode(status)) {
            // a response with an unknown status code MUST NOT be
            // cached
            if (LOG.isDebugEnabled()) {
                LOG.debug("{} response is unknown", status);
            }
            return false;
        }
        return false;
    }
Determines whether the given CacheControl object indicates that the response is explicitly non-cacheable.

@param cacheControl the CacheControl object representing the cache-control directive(s) from the HTTP response.
@return true if the response is explicitly non-cacheable according to the cache-control directive(s),
false otherwise.
<p>
When cacheControl is non-null:
- Returns true if the response contains "no-store" or (if sharedCache is true) "private" cache-control directives.
- If the response contains the "no-cache" directive, it is considered cacheable, but requires validation against
the origin server before use. In this case, the method returns false.
- Returns false for other cache-control directives, implying the response is cacheable.
<p>
When cacheControl is null, returns false, implying the response is cacheable.
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseCachingPolicy.java