public class CacheInterceptorOffline extends CacheInterceptor
描述:支持离线缓存,使用OKhttp自带的缓存功能
作者: zhouyou在Retrofit中,我们可以通过@Headers来配置,如:
cacheControlValue_Offline, cacheControlValue_Online, context, maxStale, maxStaleOnline| 构造器和说明 |
|---|
CacheInterceptorOffline(android.content.Context context) |
CacheInterceptorOffline(android.content.Context context,
java.lang.String cacheControlValue) |
CacheInterceptorOffline(android.content.Context context,
java.lang.String cacheControlValue,
java.lang.String cacheOnlineControlValue) |
public CacheInterceptorOffline(android.content.Context context)
public CacheInterceptorOffline(android.content.Context context,
java.lang.String cacheControlValue)
public CacheInterceptorOffline(android.content.Context context,
java.lang.String cacheControlValue,
java.lang.String cacheOnlineControlValue)
public Response intercept(Chain chain)
throws java.io.IOException
intercept 在类中 CacheInterceptorjava.io.IOException