Package org.apache.hc.client5.http.cache
Interface CacheControl
-
- All Known Implementing Classes:
RequestCacheControl,ResponseCacheControl
@Contract(threading=IMMUTABLE) public interface CacheControlRepresents the values of the Cache-Control header in an HTTP message, which indicate whether and for how long the response can be cached by the client and intermediary proxies.- Since:
- 5.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetMaxAge()Returns the max-age value from the Cache-Control header.longgetStaleIfError()Returns the stale-if-error value from the Cache-Control header.booleanisNoCache()Returns the no-cache flag from the Cache-Control header.booleanisNoStore()Returns the no-store flag from the Cache-Control header.
-
-
-
Method Detail
-
getMaxAge
long getMaxAge()
Returns the max-age value from the Cache-Control header.- Returns:
- The max-age value.
-
isNoCache
boolean isNoCache()
Returns the no-cache flag from the Cache-Control header.- Returns:
- The no-cache flag.
-
isNoStore
boolean isNoStore()
Returns the no-store flag from the Cache-Control header.- Returns:
- The no-store flag.
-
getStaleIfError
long getStaleIfError()
Returns the stale-if-error value from the Cache-Control header.- Returns:
- The stale-if-error value.
-
-