boolean staleIfErrorAppliesTo(final int statusCode) {
        return statusCode == HttpStatus.SC_INTERNAL_SERVER_ERROR
                || statusCode == HttpStatus.SC_BAD_GATEWAY
                || statusCode == HttpStatus.SC_SERVICE_UNAVAILABLE
                || statusCode == HttpStatus.SC_GATEWAY_TIMEOUT;
    }
Reports the number of times that the cache was able to satisfy
a response by revalidating an existing but stale cache entry.
@return the number of cache revalidations
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingExecBase.java