public enum CacheControl extends java.lang.Enum<CacheControl>
CacheControl represents strategies for what order a NormalizedCache will be accessed with respect
to the network.
To control how a cache reads and writes a response to the cache, see CacheHeaders.| Enum Constant and Description |
|---|
CACHE_FIRST
Signals the apollo client to first fetch the data from the normalized cache.
|
CACHE_ONLY
Signals the apollo client to only fetch the data from the normalized cache.
|
NETWORK_FIRST
Signals the apollo client to first fetch the data from the network.
|
NETWORK_ONLY
Signals the apollo client to only fetch the GraphQL data from the network.
|
| Modifier and Type | Method and Description |
|---|---|
static CacheControl |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CacheControl[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CacheControl CACHE_FIRST
public static final CacheControl CACHE_ONLY
Response is sent back with the Operation info
wrapped inside.public static final CacheControl NETWORK_FIRST
public static final CacheControl NETWORK_ONLY
public static CacheControl[] values()
for (CacheControl c : CacheControl.values()) System.out.println(c);
public static CacheControl valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null