- All Implemented Interfaces:
Serializable,Comparable<WebRequest.CacheMode>,Constable
- Enclosing class:
- WebRequest
The cache mode of a request, as defined by the Fetch spec; used by
fetch().- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUse the cache like the browser does it for normal requests.A cached response is used also if it is stale.A cached response is always validated with a conditional request.Do not use the cache: no lookup and the response is not stored.Only a cached response (also a stale one) is used; without one this is a network error.No lookup in the cache, but the response is stored. -
Method Summary
Modifier and TypeMethodDescriptionstatic WebRequest.CacheModeReturns the enum constant of this class with the specified name.static WebRequest.CacheMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Use the cache like the browser does it for normal requests. -
NO_STORE
Do not use the cache: no lookup and the response is not stored. -
RELOAD
No lookup in the cache, but the response is stored. -
NO_CACHE
A cached response is always validated with a conditional request. -
FORCE_CACHE
A cached response is used also if it is stale. -
ONLY_IF_CACHED
Only a cached response (also a stale one) is used; without one this is a network error.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-