public interface HttpCacheEngine
| Modifier and Type | Method and Description |
|---|---|
void |
cacheResponse(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response,
HttpCacheConfig cacheConfig)
Cache the given response.
|
boolean |
deliverCacheContent(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response,
HttpCacheConfig cacheConfig)
Deliver the response from the cache.
|
HttpCacheConfig |
getCacheConfig(org.apache.sling.api.SlingHttpServletRequest request)
Get the first, based on cache config order, cache config applicable for the given request.
|
HttpCacheConfig |
getCacheConfig(org.apache.sling.api.SlingHttpServletRequest request,
HttpCacheConfig.FilterScope filterScope)
Get the first, based on cache config order, cache config applicable for the given request.
|
void |
invalidateCache(String path)
Invalidate the cache for the HttpCacheConfig which is
interested in the given path.
|
boolean |
isCacheHit(org.apache.sling.api.SlingHttpServletRequest request,
HttpCacheConfig cacheConfig)
Check if the given request can be served from available cache.
|
boolean |
isPathPotentialToInvalidate(String path)
Check if the supplied JCR repository path has the potential to invalidate cache.
|
boolean |
isRequestCacheable(org.apache.sling.api.SlingHttpServletRequest request,
HttpCacheConfig cacheConfig)
Check if the given request is cache-able per custom cache handling rules.
|
HttpCacheServletResponseWrapper |
wrapResponse(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response,
HttpCacheConfig httpCacheConfig)
Wrap the response so that response stream can be duplicated.
|
boolean isRequestCacheable(org.apache.sling.api.SlingHttpServletRequest request,
HttpCacheConfig cacheConfig)
throws HttpCacheRepositoryAccessException
HttpCacheHandlingRule.onRequestReceive(SlingHttpServletRequest) exposed.request - cacheConfig - HttpCacheRepositoryAccessExceptionHttpCacheConfig getCacheConfig(org.apache.sling.api.SlingHttpServletRequest request) throws HttpCacheConfigConflictException, HttpCacheRepositoryAccessException
request - HttpCacheConfigConflictException - When more than one cache config matches.HttpCacheRepositoryAccessExceptionHttpCacheConfig getCacheConfig(org.apache.sling.api.SlingHttpServletRequest request, HttpCacheConfig.FilterScope filterScope) throws HttpCacheConfigConflictException, HttpCacheRepositoryAccessException
request - filterScope - HttpCacheConfigConflictException - When more than one cache config matches.HttpCacheRepositoryAccessExceptionboolean isCacheHit(org.apache.sling.api.SlingHttpServletRequest request,
HttpCacheConfig cacheConfig)
throws HttpCachePersistenceException,
HttpCacheKeyCreationException
request - cacheConfig - HttpCachePersistenceExceptionHttpCacheKeyCreationExceptionboolean deliverCacheContent(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response,
HttpCacheConfig cacheConfig)
throws HttpCachePersistenceException,
HttpCacheKeyCreationException,
HttpCacheDataStreamException
.rule.HttpCacheHandlingRule#onCacheDeliver(SlingHttpServletRequest, SlingHttpServletResponse) exposed.request - response - cacheConfig - HttpCachePersistenceExceptionHttpCacheKeyCreationExceptionHttpCacheDataStreamExceptionHttpCacheServletResponseWrapper wrapResponse(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, HttpCacheConfig httpCacheConfig) throws HttpCacheDataStreamException, HttpCacheKeyCreationException, HttpCachePersistenceException
request - response - httpCacheConfig - HttpCacheDataStreamExceptionHttpCacheKeyCreationExceptionHttpCachePersistenceExceptionvoid cacheResponse(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response,
HttpCacheConfig cacheConfig)
throws HttpCacheKeyCreationException,
HttpCacheDataStreamException,
HttpCachePersistenceException
.HttpCacheHandlingRule#onResponseCache(SlingHttpServletRequest, SlingHttpServletResponse) exposed.request - response - cacheConfig - HttpCacheKeyCreationExceptionHttpCacheDataStreamExceptionHttpCachePersistenceExceptionboolean isPathPotentialToInvalidate(String path)
HttpCacheConfig.path - JCR repository path.void invalidateCache(String path) throws HttpCachePersistenceException, HttpCacheKeyCreationException
.HttpCacheHandlingRule#onCacheInvalidate(String) exposed.path - JCR repository path.HttpCachePersistenceExceptionHttpCacheKeyCreationExceptionCopyright © 2013–2020 Adobe. All rights reserved.