public interface InternalCache
Cache.| Modifier and Type | Method and Description |
|---|---|
Response |
get(Request request) |
CacheRequest |
put(Response response) |
void |
remove(Request request)
Remove any cache entries for the supplied
request. |
void |
trackConditionalCacheHit()
Track an conditional GET that was satisfied by this cache.
|
void |
trackResponse(CacheStrategy cacheStrategy)
Track an HTTP response being satisfied with
cacheStrategy. |
void |
update(Response cached,
Response network)
Handles a conditional request hit by updating the stored cache response with the headers from
network. |
Response get(Request request) throws IOException
IOExceptionCacheRequest put(Response response) throws IOException
IOExceptionvoid remove(Request request) throws IOException
request. This is invoked when the client
invalidates the cache, such as when making POST requests.IOExceptionvoid update(Response cached, Response network)
network. The cached response body is not updated. If the stored response has changed
since cached was returned, this does nothing.void trackConditionalCacheHit()
void trackResponse(CacheStrategy cacheStrategy)
cacheStrategy.Copyright © 2017. All Rights Reserved.