Interface CacheControl
- All Known Implementing Classes:
RequestCacheControl, ResponseCacheControl
@Contract(threading=IMMUTABLE)
public interface CacheControl
Represents 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
Modifier and TypeMethodDescriptionlongReturns the max-age value from the Cache-Control header.longReturns the stale-if-error value from the Cache-Control header.booleanReturns the no-cache flag from the Cache-Control header.booleanReturns the no-store flag from the Cache-Control header.
-
Method Details
-
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.
-