public interface InternalCache
Cache.
| Modifier and Type | Method and Description |
|---|---|
Response |
get(Request
|
CacheRequest |
put(Response
|
void |
remove(Request
Remove any cache entries for the supplied
request.
|
void |
trackConditionalCacheHit()
Track an conditional GET that was satisfied by this cache.
|
void |
trackResponse(CacheStrategy
Track an HTTP response being satisfied with
cacheStrategy.
|
void |
update(Response
Handles a conditional request hit by updating the stored cache response with the headers from
network.
|
Responseget(Request request) throws IOException
IOException
CacheRequestput(Response response) throws IOException
IOException
void remove(Requestrequest) throws IOException
request. This is invoked when the client invalidates the cache, such as when making POST requests.
IOException
void update(Responsecached, 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(CacheStrategycacheStrategy)
cacheStrategy.