-
public final class CacheStrategyGiven a mobonRequest and cached response, this figures out whether to use the network, the cache, or both.
Selecting a cache strategy may add conditions to the mobonRequest (like the "If-Modified-Since" header for conditional GETs) or warnings to the cached response (if the cached data is potentially stale).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCacheStrategy.Factory
-
Field Summary
Fields Modifier and Type Field Description public final MobonRequestnetworkMobonRequestpublic final MobonResponsecacheMobonResponse
-
Method Summary
Modifier and Type Method Description static booleanisCacheable(MobonResponse mobonResponse, MobonRequest mobonRequest)Returns true if {@code mobonResponse}can be stored to later serve another mobonRequest.-
-
Method Detail
-
isCacheable
static boolean isCacheable(MobonResponse mobonResponse, MobonRequest mobonRequest)
Returns true if
{@code mobonResponse}can be stored to later serve another mobonRequest.
-
-
-
-