public class HttpResponseCacheImpl extends Object implements HttpResponseCache
| Constructor and Description |
|---|
HttpResponseCacheImpl(org.springframework.cache.Cache cache,
boolean sharedCache,
int maxResponseSize) |
HttpResponseCacheImpl(org.springframework.cache.Cache cache,
boolean sharedCache,
int maxResponseSize,
CacheKeyGenerator keyGenerator) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.client.ClientHttpResponse |
cacheAndReturnResponse(org.springframework.http.HttpRequest request,
org.springframework.http.client.ClientHttpResponse response,
Date requestSent,
Date responseReceived)
Store
ClientHttpResponse, if possible, and return it. |
void |
clear() |
void |
evict(org.springframework.http.HttpRequest request) |
CacheEntry |
getCacheEntry(org.springframework.http.HttpRequest request)
Returns a cached response for the given request.
|
public HttpResponseCacheImpl(org.springframework.cache.Cache cache,
boolean sharedCache,
int maxResponseSize)
public HttpResponseCacheImpl(org.springframework.cache.Cache cache,
boolean sharedCache,
int maxResponseSize,
CacheKeyGenerator keyGenerator)
public void clear()
clear in interface HttpResponseCachepublic void evict(org.springframework.http.HttpRequest request)
evict in interface HttpResponseCachepublic CacheEntry getCacheEntry(org.springframework.http.HttpRequest request)
HttpResponseCachegetCacheEntry in interface HttpResponseCacherequest - The request whose associated response is to be returned.null if
this cache contains no entry for the request.public org.springframework.http.client.ClientHttpResponse cacheAndReturnResponse(org.springframework.http.HttpRequest request,
org.springframework.http.client.ClientHttpResponse response,
Date requestSent,
Date responseReceived)
throws IOException
HttpResponseCacheClientHttpResponse, if possible, and return it.cacheAndReturnResponse in interface HttpResponseCacherequest - The request with which the given response is to be associated.response - The response object to be cached.requestSent - When the request was send.responseReceived - When the response was received.IOExceptionCopyright © 2014. All rights reserved.