public final class CacheStrategy extends Object
Selecting a cache strategy may add conditions to the request (like the "If-Modified-Since" header for conditional GETs) or warnings to the cached response (if the cached data is potentially stale).
Modifier and Type | Class and Description |
---|---|
static class |
CacheStrategy.Factory |
Modifier and Type | Field and Description |
---|---|
Response |
cacheResponse
The cached response to return or validate; or null if this call doesn't use a cache.
|
Request |
networkRequest
The request to send on the network, or null if this call doesn't use the network.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isCacheable(Response response,
Request request)
Returns true if
response can be stored to later serve another
request. |
Copyright © 2017. All Rights Reserved.