接口 InternalCache
public interface InternalCache
OkHttp's internal cache interface. Applications shouldn't implement this: instead use
Cache.-
方法概要
修饰符和类型方法说明voidRemove any cache entries for the suppliedrequest.voidTrack an conditional GET that was satisfied by this cache.voidtrackResponse(CacheStrategy cacheStrategy) Track an HTTP response being satisfied withcacheStrategy.voidHandles a conditional request hit by updating the stored cache response with the headers fromnetwork.
-
方法详细资料
-
get
- 抛出:
IOException
-
put
- 抛出:
IOException
-
remove
Remove any cache entries for the suppliedrequest. This is invoked when the client invalidates the cache, such as when making POST requests.- 抛出:
IOException
-
update
Handles a conditional request hit by updating the stored cache response with the headers fromnetwork. The cached response body is not updated. If the stored response has changed sincecachedwas returned, this does nothing. -
trackConditionalCacheHit
void trackConditionalCacheHit()Track an conditional GET that was satisfied by this cache. -
trackResponse
Track an HTTP response being satisfied withcacheStrategy.
-