@ProviderType
public interface HttpCacheConfig
HttpCacheConfigExtension
Modifier and Type | Interface and Description |
---|---|
static class |
HttpCacheConfig.FilterScope |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(org.apache.sling.api.SlingHttpServletRequest request)
Determine if this cache config is applicable for the given request.
|
boolean |
acceptsRule(String servicePid)
Check if the cache config accepts the service pid of the cache handling rule.
|
CacheKey |
buildCacheKey(org.apache.sling.api.SlingHttpServletRequest request)
Creates the CacheKey object using the CacheKeyFactory associated with this HttpCacheConfig factory instance.
|
CacheKey |
buildCacheKey(String resourcePath)
Creates the CacheKey object using the CacheKeyFactory associated with this HttpCacheConfig factory instance.
|
boolean |
canInvalidate(String path)
Determines if a JCR path is a candidate for invalidating this cache.
|
String |
getAuthenticationRequirement()
Get the authentication requirement for request set for this config.
|
List<Pattern> |
getBlacklistedRequestUriPatterns()
Get the configured list of blacklisted request URIs.
|
String |
getCacheStoreName()
Name of the configured cache store.
|
default List<String> |
getExcludedCookieKeys()
Get a list of excluded cookie keys (simple string) of cookies that should NOT be put in the cached response, to be served to the output.
|
default List<Pattern> |
getExcludedResponseHeaderPatterns()
Get a list of headers (as regex pattern) that should NOT be put in the cached response, to be served to the output.
|
default long |
getExpiryForAccess()
Gets the expiry time for the cache entry access / read.
|
default long |
getExpiryForUpdate()
Gets the expiry time for the cache entry updated.
|
default long |
getExpiryOnCreate()
Returns a custom expiry for this config in miliseconds.
|
HttpCacheConfig.FilterScope |
getFilterScope() |
List<Pattern> |
getJCRInvalidationPathPatterns()
Get the configured list of JCR paths that could unvalidate this config.
|
int |
getOrder()
Gets the order the HttpCacheConfig should be executed in.
|
List<Pattern> |
getRequestUriPatterns()
Get the configured list of whitelisted request URIs.
|
boolean |
isValid() |
boolean |
knows(CacheKey key)
Returns true if the key is generated using this cache config.
|
String getCacheStoreName()
String getAuthenticationRequirement()
AuthenticationStatusConfigConstants
List<Pattern> getRequestUriPatterns()
List<Pattern> getBlacklistedRequestUriPatterns()
List<Pattern> getJCRInvalidationPathPatterns()
default List<Pattern> getExcludedResponseHeaderPatterns()
default List<String> getExcludedCookieKeys()
boolean accepts(org.apache.sling.api.SlingHttpServletRequest request) throws HttpCacheRepositoryAccessException
HttpCacheConfigExtension
.accept()
for providing share of control to the custom code.request
- the requestHttpCacheRepositoryAccessException
boolean isValid()
CacheKey buildCacheKey(org.apache.sling.api.SlingHttpServletRequest request) throws HttpCacheKeyCreationException
request
- the request to create the CacheKey forHttpCacheKeyCreationException
CacheKey buildCacheKey(String resourcePath) throws HttpCacheKeyCreationException
resourcePath
- the resourcePath associated with the Cache KeyHttpCacheKeyCreationException
boolean canInvalidate(String path)
path
- the jcr pathboolean knows(CacheKey key) throws HttpCacheKeyCreationException
key
- HttpCacheKeyCreationException
int getOrder()
boolean acceptsRule(String servicePid)
servicePid
- Service pid of HttpCacheHandlingRule.HttpCacheConfig.FilterScope getFilterScope()
default long getExpiryOnCreate()
default long getExpiryForAccess()
default long getExpiryForUpdate()
Copyright © 2013–2021 Adobe. All rights reserved.