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 Type
    Method
    Description
    long
    Returns the max-age value from the Cache-Control header.
    long
    Returns the stale-if-error value from the Cache-Control header.
    boolean
    Returns the no-cache flag from the Cache-Control header.
    boolean
    Returns 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.