org.apache.http.impl.client.cache
Class ResponseCachingPolicy
java.lang.Object
org.apache.http.impl.client.cache.ResponseCachingPolicy
@Immutable
public class ResponseCachingPolicy
- extends Object
Determines if an HttpResponse can be cached.
- Since:
- 4.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResponseCachingPolicy
public ResponseCachingPolicy(int maxObjectSizeBytes)
- Parameters:
maxObjectSizeBytes
-
isResponseCacheable
public boolean isResponseCacheable(String httpMethod,
HttpResponse response)
- Determines if an HttpResponse can be cached.
- Parameters:
httpMethod
- response
-
- Returns:
true
if response is cacheable
isExplicitlyNonCacheable
protected boolean isExplicitlyNonCacheable(HttpResponse response)
isExplicitlyCacheable
protected boolean isExplicitlyCacheable(HttpResponse response)
isResponseCacheable
public boolean isResponseCacheable(HttpRequest request,
HttpResponse response)
- Parameters:
request
- response
-
- Returns:
true
if response is cacheable
Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.