boolean lastModifiedValidatorMatches(final HttpRequest request, final HttpCacheEntry entry, final Instant now) {
        final Instant lastModified = entry.getLastModified();
        if (lastModified == null) {
            return false;
        }

        for (final Header h : request.getHeaders(HttpHeaders.IF_MODIFIED_SINCE)) {
            final Instant ifModifiedSince = DateUtils.parseStandardDate(h.getValue());
            if (ifModifiedSince != null) {
                if (ifModifiedSince.isAfter(now) || lastModified.isAfter(ifModifiedSince)) {
                    return false;
                }
            }
        }
        return true;
    }
Check entry against If-Modified-Since, if If-Modified-Since is in the future it is invalid
@param request The current httpRequest being made
@param entry the cache entry
@param now right NOW in time
@return  boolean Does the last modified header match
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachedResponseSuitabilityChecker.java