Module org.htmlunit
Package org.htmlunit

Enum Class WebRequest.CacheMode

java.lang.Object
java.lang.Enum<WebRequest.CacheMode>
org.htmlunit.WebRequest.CacheMode
All Implemented Interfaces:
Serializable, Comparable<WebRequest.CacheMode>, Constable
Enclosing class:
WebRequest

public static enum WebRequest.CacheMode extends Enum<WebRequest.CacheMode>
The cache mode of a request, as defined by the Fetch spec; used by fetch().
See Also:
  • Enum Constant Details

    • DEFAULT

      public static final WebRequest.CacheMode DEFAULT
      Use the cache like the browser does it for normal requests.
    • NO_STORE

      public static final WebRequest.CacheMode NO_STORE
      Do not use the cache: no lookup and the response is not stored.
    • RELOAD

      public static final WebRequest.CacheMode RELOAD
      No lookup in the cache, but the response is stored.
    • NO_CACHE

      public static final WebRequest.CacheMode NO_CACHE
      A cached response is always validated with a conditional request.
    • FORCE_CACHE

      public static final WebRequest.CacheMode FORCE_CACHE
      A cached response is used also if it is stale.
    • ONLY_IF_CACHED

      public static final WebRequest.CacheMode ONLY_IF_CACHED
      Only a cached response (also a stale one) is used; without one this is a network error.
  • Method Details

    • values

      public static WebRequest.CacheMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static WebRequest.CacheMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null