public final class CacheControl extends Object
See RFC 2616, 14.9.
Modifier and Type | Method and Description |
---|---|
boolean |
isPublic() |
int |
maxAgeSeconds()
The duration past the response's served date that it can be served without
validation.
|
int |
maxStaleSeconds() |
int |
minFreshSeconds() |
boolean |
mustRevalidate() |
boolean |
noCache()
In a response, this field's name "no-cache" is misleading.
|
boolean |
noStore()
If true, this response should not be cached.
|
boolean |
onlyIfCached()
This field's name "only-if-cached" is misleading.
|
static CacheControl |
parse(com.squareup.okhttp.internal.http.Headers headers)
Returns the cache directives of
headers . |
int |
sMaxAgeSeconds()
The "s-maxage" directive is the max age for shared caches.
|
public boolean noCache()
In a request, it means do not use a cache to satisfy the request.
public boolean noStore()
public int maxAgeSeconds()
public int sMaxAgeSeconds()
public boolean isPublic()
public boolean mustRevalidate()
public int maxStaleSeconds()
public int minFreshSeconds()
public boolean onlyIfCached()
public static CacheControl parse(com.squareup.okhttp.internal.http.Headers headers)
headers
. This honors both
Cache-Control and Pragma headers if they are present.Copyright © 2014. All Rights Reserved.