-
public interface InternalCacheOkHttp's internal cache interface. Applications shouldn't implement this: instead use .
-
-
Method Summary
Modifier and Type Method Description abstract MobonResponseget(MobonRequest mobonRequest)abstract CacheRequestput(MobonResponse mobonResponse)abstract voidremove(MobonRequest mobonRequest)Remove any cache entries for the supplied {@code mobonRequest}.abstract voidupdate(MobonResponse cached, MobonResponse network)Handles a conditional mobonRequest hit by updating the stored cache response with the headers from {@code network}.abstract voidtrackConditionalCacheHit()Track an conditional GET that was satisfied by this cache. abstract voidtrackResponse(CacheStrategy cacheStrategy)Track an HTTP response being satisfied with {@code cacheStrategy}.-
-
Method Detail
-
get
abstract MobonResponse get(MobonRequest mobonRequest)
-
put
abstract CacheRequest put(MobonResponse mobonResponse)
-
remove
abstract void remove(MobonRequest mobonRequest)
Remove any cache entries for the supplied
{@code mobonRequest}. This is invoked when the clientinvalidates the cache, such as when making POST requests.
-
update
abstract void update(MobonResponse cached, MobonResponse network)
Handles a conditional mobonRequest hit by updating the stored cache response with the headers from
{@code network}. The cached response body is not updated. If the stored response has changedsince{@code cached}was returned, this does nothing.
-
trackConditionalCacheHit
abstract void trackConditionalCacheHit()
Track an conditional GET that was satisfied by this cache.
-
trackResponse
abstract void trackResponse(CacheStrategy cacheStrategy)
Track an HTTP response being satisfied with
{@code cacheStrategy}.
-
-
-
-