|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.impl.client.cache.ResponseCachingPolicy
@Immutable public class ResponseCachingPolicy
Determines if an HttpResponse can be cached.
Constructor Summary | |
---|---|
ResponseCachingPolicy(int maxObjectSizeBytes)
Define a cache policy that limits the size of things that should be stored in the cache to a maximum of HttpResponse bytes in size. |
Method Summary | |
---|---|
protected boolean |
hasCacheControlParameterFrom(HttpResponse response,
String[] params)
|
protected boolean |
isExplicitlyCacheable(HttpResponse response)
|
protected boolean |
isExplicitlyNonCacheable(HttpResponse response)
|
boolean |
isResponseCacheable(HttpRequest request,
HttpResponse response)
Determine if the HttpResponse gotten from the origin is a
cacheable response. |
boolean |
isResponseCacheable(String httpMethod,
HttpResponse response)
Determines if an HttpResponse can be cached. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResponseCachingPolicy(int maxObjectSizeBytes)
HttpResponse
bytes in size.
maxObjectSizeBytes
- the size to limit items into the cacheMethod Detail |
---|
public boolean isResponseCacheable(String httpMethod, HttpResponse response)
httpMethod
- What type of request was this, a GET, PUT, other?response
- The origin response
true
if response is cacheableprotected boolean isExplicitlyNonCacheable(HttpResponse response)
protected boolean hasCacheControlParameterFrom(HttpResponse response, String[] params)
protected boolean isExplicitlyCacheable(HttpResponse response)
public boolean isResponseCacheable(HttpRequest request, HttpResponse response)
HttpResponse
gotten from the origin is a
cacheable response.
request
- the HttpRequest
that generated an origin hitresponse
- the HttpResponse
from the origin
true
if response is cacheable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |