@Override
    public String toString() {
        final StringBuilder buf = new StringBuilder();
        buf.append("[");
        if (maxAge >= 0) {
            buf.append("max-age=").append(maxAge).append(",");
        }
        if (maxStale >= 0) {
            buf.append("max-stale=").append(maxStale).append(",");
        }
        if (minFresh >= 0) {
            buf.append("min-fresh=").append(minFresh).append(",");
        }
        if (noCache) {
            buf.append("no-cache").append(",");
        }
        if (noStore) {
            buf.append("no-store").append(",");
        }
        if (onlyIfCached) {
            buf.append("only-if-cached").append(",");
        }
        if (staleIfError >= 0) {
            buf.append("stale-if-error").append(staleIfError).append(",");
        }
        if (buf.charAt(buf.length() - 1) == ',') {
            buf.setLength(buf.length() - 1);
        }
        buf.append("]");
        return buf.toString();
    }
Returns the stale-if-error value from the Cache-Control header.

@return The stale-if-error value.
httpclient5-cache/src/main/java/org/apache/hc/client5/http/cache/RequestCacheControl.java