public final class CacheAdapter extends Object implements InternalCache
ResponseCache to InternalCache.| Constructor and Description |
|---|
CacheAdapter(ResponseCache delegate) |
| Modifier and Type | Method and Description |
|---|---|
Response |
get(Request request) |
ResponseCache |
getDelegate() |
CacheRequest |
put(Response response) |
void |
remove(Request request) |
void |
trackConditionalCacheHit() |
void |
trackResponse(com.squareup.okhttp.internal.http.CacheStrategy cacheStrategy) |
void |
update(Response cached,
Response network) |
public CacheAdapter(ResponseCache delegate)
public ResponseCache getDelegate()
public Response get(Request request) throws IOException
get in interface InternalCacheIOExceptionpublic CacheRequest put(Response response) throws IOException
put in interface InternalCacheIOExceptionpublic void remove(Request request) throws IOException
remove in interface InternalCacheIOExceptionpublic void update(Response cached, Response network) throws IOException
update in interface InternalCacheIOExceptionpublic void trackConditionalCacheHit()
trackConditionalCacheHit in interface InternalCachepublic void trackResponse(com.squareup.okhttp.internal.http.CacheStrategy cacheStrategy)
trackResponse in interface InternalCacheCopyright © 2014. All Rights Reserved.