public class CacheInterceptor
extends java.lang.Object
描述:设置缓存功能
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
cacheControlValue_Offline |
protected java.lang.String |
cacheControlValue_Online |
protected android.content.Context |
context |
protected static int |
maxStale |
protected static int |
maxStaleOnline |
| Constructor and Description |
|---|
CacheInterceptor(android.content.Context context) |
CacheInterceptor(android.content.Context context,
java.lang.String cacheControlValue) |
CacheInterceptor(android.content.Context context,
java.lang.String cacheControlValueOffline,
java.lang.String cacheControlValueOnline) |
| Modifier and Type | Method and Description |
|---|---|
Response |
intercept(Chain chain) |
protected android.content.Context context
protected java.lang.String cacheControlValue_Offline
protected java.lang.String cacheControlValue_Online
protected static final int maxStale
protected static final int maxStaleOnline
public CacheInterceptor(android.content.Context context)
public CacheInterceptor(android.content.Context context,
java.lang.String cacheControlValue)
public CacheInterceptor(android.content.Context context,
java.lang.String cacheControlValueOffline,
java.lang.String cacheControlValueOnline)