@ProviderType
public interface CacheHandler
| Modifier and Type | Interface and Description |
|---|---|
static class |
CacheHandler.TRI_STATE
Tri-State type.
|
| Modifier and Type | Method and Description |
|---|---|
CacheHandler.TRI_STATE |
onDeliver(java.lang.String key,
Headers headers,
javax.servlet.http.HttpServletResponse response)
Used after a cache hit to give a cache handler the opportunity to modify
the response headers being delivered, or forbid delivering the cache file.
|
CacheHandler.TRI_STATE |
onFetch(int status,
Headers headers,
javax.servlet.http.HttpServletResponse response)
Used upon receiving the response to determine whether the response is suitable
for caching.
|
CacheHandler.TRI_STATE |
onReceive(javax.servlet.http.HttpServletRequest request)
Used upon receiving a request to determine whether its response is suitable
to be cached.
|
CacheHandler.TRI_STATE onReceive(javax.servlet.http.HttpServletRequest request)
request - requestCacheHandler.TRI_STATE.YES to try caching the response;
CacheHandler.TRI_STATE.NO to skip this request;
CacheHandler.TRI_STATE.NEXT_HANDLER to ask the next handlerCacheHandler.TRI_STATE onDeliver(java.lang.String key, Headers headers, javax.servlet.http.HttpServletResponse response)
key - cache keyheaders - response headersresponse - responseCacheHandler.TRI_STATE.YES to deliver the cache file;
CacheHandler.TRI_STATE.NO to forbid delivering;
CacheHandler.TRI_STATE.NEXT_HANDLER to ask the next handlerCacheHandler.TRI_STATE onFetch(int status, Headers headers, javax.servlet.http.HttpServletResponse response)
HttpServletResponse.SC_OK and if no cache control response
header denies caching.status - response statusheaders - response headers that will be stored along with the responseresponse - servlet responseCacheHandler.TRI_STATE.YES to create an entry in the cache
CacheHandler.TRI_STATE.NO to forbid creating;
CacheHandler.TRI_STATE.NEXT_HANDLER to ask the next handlerCopyright © 2010 - 2023 Adobe. All Rights Reserved