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
IOException
CacheRequest put(Response response) throws IOException
IOException
void remove(Request request) throws IOException
request
. This is invoked
when the client invalidates the cache, such as when making POST requests.IOException
void update(Response cached, Response network) throws IOException
network
. The cached response body is not
updated. If the stored response has changed since cached
was
returned, this does nothing.IOException
void trackConditionalCacheHit()
void trackResponse(CacheStrategy cacheStrategy)
cacheStrategy
.Copyright © 2015. All rights reserved.