org.apache.hc.client5.http.cache

## 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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getMaxAge()` Returns the max-age value from the Cache-Control header.
    `long` | `getStaleIfError()` Returns the stale-if-error value from the Cache-Control header.
    `boolean` | `isNoCache()` Returns the no-cache flag from the Cache-Control header.
    `boolean` | `isNoStore()` 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.

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.