Class CacheControl

All Implemented Interfaces:
HttpHeader

public class CacheControl extends HttpStringHeader
Represents an HTTP Cache-Control header.

Used to specify directives that must be obeyed by all caching mechanisms along the request-response chain.

See Also:
Since:
9.2.1
  • Field Details

  • Constructor Details

    • CacheControl

      public CacheControl(String value)
      Constructor with an eager value.
      Parameters:
      value - The header value. May be null.
    • CacheControl

      public CacheControl(Supplier<String> valueSupplier)
      Constructor with a lazy value supplier.
      Parameters:
      valueSupplier - Supplier for the header value. Must not be null.
  • Method Details

    • of

      public static CacheControl of(String value)
      Static factory method with an eager value.
      Parameters:
      value - The header value. May be null.
      Returns:
      A new instance. Never null.
    • of

      public static CacheControl of(Supplier<String> valueSupplier)
      Static factory method with a lazy value supplier.
      Parameters:
      valueSupplier - Supplier for the header value. Must not be null.
      Returns:
      A new instance. Never null.
    • create

      public static CacheControl.Builder create()
      Creates a new empty CacheControl.Builder.
      Returns:
      A new builder. Never null.