@Deprecated public class AggregateCacheFilter extends AbstractFilter implements org.springframework.context.ApplicationListener<JahiaTemplateManagerService.TemplatePackageRedeployedEvent>
AbstractFilter.AjaxRequestCondition, AbstractFilter.AnyOfCondition, AbstractFilter.ConfigurationCondition, AbstractFilter.EditModeCondition, AbstractFilter.ExecutionCondition, AbstractFilter.MainResourceCondition, AbstractFilter.ModeCondition, AbstractFilter.ModuleCondition, AbstractFilter.NodeTypeCondition, AbstractFilter.NotCondition, AbstractFilter.PatternCondition, AbstractFilter.RequestAttributeCondition, AbstractFilter.RequestCondition, AbstractFilter.RequestHeaderCondition, AbstractFilter.RequestParameterCondition, AbstractFilter.SiteTemplateSetCondition, AbstractFilter.TemplateCondition, AbstractFilter.TemplateTypeCondition, AbstractFilter.WebflowRequestCondition| Modifier and Type | Field and Description |
|---|---|
static String |
ALL
Deprecated.
|
static Set<String> |
ALL_SET
Deprecated.
|
static String |
CACHE_EXPIRATION
Deprecated.
|
static String |
CACHE_PER_USER
Deprecated.
|
protected ModuleCacheProvider |
cacheProvider
Deprecated.
|
protected boolean |
cascadeFragmentErrors
Deprecated.
|
protected static Pattern |
CLEANUP_REGEXP
Deprecated.
|
protected int |
dependenciesLimit
Deprecated.
|
static String |
EMPTY_USERKEY
Deprecated.
|
protected int |
errorCacheExpiration
Deprecated.
|
static TextUtils.ReplacementGenerator |
GENERATOR
Deprecated.
|
protected ModuleGeneratorQueue |
generatorQueue
Deprecated.
|
static String |
HAS_PROCESSING_SEMAPHORE_PARAM
Deprecated.
|
protected static long |
lastThreadDumpTime
Deprecated.
|
protected static org.slf4j.Logger |
logger
Deprecated.
|
protected static Map<String,Boolean> |
notCacheableFragment
Deprecated.
|
static String |
PER_USER
Deprecated.
|
protected static ThreadLocal<Set<CountDownLatch>> |
processingLatches
Deprecated.
|
protected Byte[] |
threadDumpCheckLock
Deprecated.
|
protected static ThreadLocal<LinkedList<String>> |
userKeys
Deprecated.
|
service| Constructor and Description |
|---|
AggregateCacheFilter()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDependencies(RenderContext renderContext,
String finalKey,
net.sf.ehcache.Cache cache,
String value,
Set<String> newDependencies)
Deprecated.
Add key to the list of dependencies
|
protected String |
aggregateContent(net.sf.ehcache.Cache cache,
String cachedContent,
RenderContext renderContext,
String areaIdentifier,
Stack<String> cacheKeyStack,
Set<String> allPaths)
Deprecated.
Aggregate the content that are inside the cached fragment to get a full HTML content with all sub modules
embedded.
|
protected String |
appendDebugInformation(RenderContext renderContext,
String key,
String renderContent,
net.sf.ehcache.Element cachedElement)
Deprecated.
|
protected CountDownLatch |
avoidParallelProcessingOfSameModule(String key,
RenderContext renderContext,
Resource resource,
Properties properties)
Deprecated.
|
protected CacheEntry<String> |
createCacheEntry(String previousOut,
RenderContext renderContext,
Resource resource,
String key)
Deprecated.
Create the cache entry based on the rendered content.
|
protected void |
doCache(String previousOut,
RenderContext renderContext,
Resource resource,
Properties properties,
net.sf.ehcache.Cache cache,
String key,
String finalKey)
Deprecated.
Create the fragment and store it into the cache.
|
protected void |
doCache(String previousOut,
RenderContext renderContext,
Resource resource,
Properties properties,
net.sf.ehcache.Cache cache,
String key,
String finalKey,
boolean bypassDependencies)
Deprecated.
|
String |
execute(String previousOut,
RenderContext renderContext,
Resource resource,
RenderChain chain)
Deprecated.
If the entry was not found in the cache, the execute method is called once all normal render processing has been
done.
|
void |
finalize(RenderContext renderContext,
Resource resource,
RenderChain chain)
Deprecated.
|
static void |
flushNotCacheableFragment()
Deprecated.
As of release 7.2, replaced by
ModuleCacheProvider.flushNonCacheableFragments() |
protected String |
generateContent(RenderContext renderContext,
String cacheKey,
String areaIdentifier,
Set<String> allPaths)
Deprecated.
Generates content for a sub fragment.
|
protected Properties |
getAttributesForKey(RenderContext renderContext,
Resource resource)
Deprecated.
Get all cache attributes that need to be applied on this fragment and that will impact key generation.
|
String |
getContentForError(RenderContext renderContext,
Resource resource,
RenderChain chain,
Exception e)
Deprecated.
|
protected boolean |
isCacheable(RenderContext renderContext,
Resource resource,
String key,
Properties properties)
Deprecated.
Is the current fragment cacheable or not.
|
protected void |
manageThreadDump()
Deprecated.
|
void |
onApplicationEvent(JahiaTemplateManagerService.TemplatePackageRedeployedEvent event)
Deprecated.
|
String |
prepare(RenderContext renderContext,
Resource resource,
RenderChain chain)
Deprecated.
The prepare method is the first entry point in the cache.
|
static String |
removeCacheTags(String content)
Deprecated.
Remove the surrounding cache:include tags - only used for the main resource, as the content won't be included
into another fragment but returned to the user
|
static String |
removeEsiTags(String content)
Deprecated.
|
void |
removeNotCacheableFragment(String key)
Deprecated.
As of release 7.2, replaced by
ModuleCacheProvider.removeNonCacheableFragmentsByEncodedPath(String) |
protected String |
replacePlaceholdersInCacheKey(RenderContext renderContext,
String key)
Deprecated.
Replace all placeholders in the cache key to get a final key.
|
protected String |
returnFromCache(RenderContext renderContext,
Resource resource,
String key,
String finalKey,
net.sf.ehcache.Element element,
net.sf.ehcache.Cache cache)
Deprecated.
This method is called if the entry is found in the cache.
|
void |
setCacheProvider(ModuleCacheProvider cacheProvider)
Deprecated.
|
void |
setCascadeFragmentErrors(boolean cascadeFragmentErrors)
Deprecated.
|
void |
setDependenciesLimit(int dependenciesLimit)
Deprecated.
|
void |
setErrorCacheExpiration(int errorCacheExpiration)
Deprecated.
|
void |
setGeneratorQueue(ModuleGeneratorQueue generatorQueue)
Deprecated.
|
void |
setSkipLatchForConfigurations(Set<String> skipLatchForConfigurations)
Deprecated.
|
void |
setSkipLatchForNodeTypes(Set<String> skipLatchForNodeTypes)
Deprecated.
|
void |
setSkipLatchForPaths(Set<String> skipLatchForPaths)
Deprecated.
|
protected String |
surroundWithCacheTag(String key,
String output)
Deprecated.
Add <!-- cache include --> tags around the content, with the cache key as an attribute.
|
protected void |
surroundWithCacheTag(String key,
StringBuilder output)
Deprecated.
|
protected boolean |
useDependencies()
Deprecated.
Sets whether dependencies should be stored per cache object for this filter, which is useful for dependent
flushes.
|
areConditionsMatched, compareTo, equals, getDescription, getPriority, hashCode, isDisabled, setDescription, setDisabled, setPriority, setRenderService, toStringaddCondition, addCondition, getConditionsSummary, setApplyOnConfigurations, setApplyOnEditMode, setApplyOnMainResource, setApplyOnModes, setApplyOnModules, setApplyOnNodeTypes, setApplyOnSiteTemplateSets, setApplyOnTemplates, setApplyOnTemplateTypes, setConditions, setSkipOnAjaxRequest, setSkipOnConfiguration, setSkipOnConfigurations, setSkipOnEditMode, setSkipOnMainResource, setSkipOnModes, setSkipOnModules, setSkipOnNodeTypes, setSkipOnTemplates, setSkipOnTemplateTypes, setSkipOnWebflowRequestprotected static final transient org.slf4j.Logger logger
public static final String CACHE_PER_USER
public static final String PER_USER
public static final String CACHE_EXPIRATION
public static final String HAS_PROCESSING_SEMAPHORE_PARAM
public static final String EMPTY_USERKEY
public static final String ALL
public static final TextUtils.ReplacementGenerator GENERATOR
protected ModuleCacheProvider cacheProvider
protected ModuleGeneratorQueue generatorQueue
protected static final Pattern CLEANUP_REGEXP
protected static ThreadLocal<Set<CountDownLatch>> processingLatches
protected static ThreadLocal<LinkedList<String>> userKeys
protected static long lastThreadDumpTime
protected Byte[] threadDumpCheckLock
protected int dependenciesLimit
protected boolean cascadeFragmentErrors
protected int errorCacheExpiration
public void setDependenciesLimit(int dependenciesLimit)
public void setCacheProvider(ModuleCacheProvider cacheProvider)
public void setGeneratorQueue(ModuleGeneratorQueue generatorQueue)
public void setCascadeFragmentErrors(boolean cascadeFragmentErrors)
public void setErrorCacheExpiration(int errorCacheExpiration)
public void setSkipLatchForConfigurations(Set<String> skipLatchForConfigurations)
public void setSkipLatchForNodeTypes(Set<String> skipLatchForNodeTypes)
public String prepare(RenderContext renderContext, Resource resource, RenderChain chain) throws Exception
prepare in interface RenderFilterprepare in class AbstractFilterrenderContext - The render contextresource - The resource to renderchain - The render chainExceptionprotected boolean isCacheable(RenderContext renderContext, Resource resource, String key, Properties properties) throws javax.jcr.RepositoryException
renderContext - render contextresource - current resourcekey - calculated cache keyproperties - cache propertiesjavax.jcr.RepositoryException - in case of JCR-related errorsprotected boolean useDependencies()
protected String returnFromCache(RenderContext renderContext, Resource resource, String key, String finalKey, net.sf.ehcache.Element element, net.sf.ehcache.Cache cache) throws RenderException
renderContext - The render contextresource - The resource being renderedkey - The key with placeholdersfinalKey - The final key with placeholders replacedelement - The cached elementcache - The cacheRenderExceptionpublic String execute(String previousOut, RenderContext renderContext, Resource resource, RenderChain chain) throws Exception
execute in interface RenderFilterexecute in class AbstractFilterpreviousOut - Result from the previous filterrenderContext - The render contextresource - The resource to renderchain - The render chainExceptionprotected void doCache(String previousOut, RenderContext renderContext, Resource resource, Properties properties, net.sf.ehcache.Cache cache, String key, String finalKey) throws javax.jcr.RepositoryException, ParseException
previousOut - renderContext - resource - properties - cache - key - finalKey - javax.jcr.RepositoryException - in case of JCR-related errorsParseExceptionprotected void doCache(String previousOut, RenderContext renderContext, Resource resource, Properties properties, net.sf.ehcache.Cache cache, String key, String finalKey, boolean bypassDependencies) throws javax.jcr.RepositoryException, ParseException
javax.jcr.RepositoryExceptionParseExceptionprotected Properties getAttributesForKey(RenderContext renderContext, Resource resource) throws javax.jcr.RepositoryException
renderContext - resource - javax.jcr.RepositoryException - in case of JCR-related errorsprotected CacheEntry<String> createCacheEntry(String previousOut, RenderContext renderContext, Resource resource, String key)
previousOut - The full rendered content, coming from the render chainrenderContext - The render contextresource - The resource that is being renderedkey - The key of the fragmentjavax.jcr.RepositoryException - in case of JCR-related errorsprotected void addDependencies(RenderContext renderContext, String finalKey, net.sf.ehcache.Cache cache, String value, Set<String> newDependencies)
renderContext - finalKey - cache - value - newDependencies - protected String replacePlaceholdersInCacheKey(RenderContext renderContext, String key)
renderContext - RenderContextkey - Key with placeholdersprotected String aggregateContent(net.sf.ehcache.Cache cache, String cachedContent, RenderContext renderContext, String areaIdentifier, Stack<String> cacheKeyStack, Set<String> allPaths) throws RenderException
cache - The cachecachedContent - The fragment, as it is stored in the cacherenderContext - The render contextareaIdentifier - cacheKeyStack - allPaths - RenderExceptionprotected String generateContent(RenderContext renderContext, String cacheKey, String areaIdentifier, Set<String> allPaths) throws RenderException
renderContext - The render contextcacheKey - The cache key of the fragment to generateareaIdentifier - allPaths - RenderExceptionprotected String surroundWithCacheTag(String key, String output)
key - The key of the fragmentoutput - The contentprotected void surroundWithCacheTag(String key, StringBuilder output)
protected String appendDebugInformation(RenderContext renderContext, String key, String renderContent, net.sf.ehcache.Element cachedElement)
public static String removeCacheTags(String content)
content - public String getContentForError(RenderContext renderContext, Resource resource, RenderChain chain, Exception e)
getContentForError in interface RenderFiltergetContentForError in class AbstractFilterpublic void finalize(RenderContext renderContext, Resource resource, RenderChain chain)
finalize in interface RenderFilterfinalize in class AbstractFilterprotected CountDownLatch avoidParallelProcessingOfSameModule(String key, RenderContext renderContext, Resource resource, Properties properties) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionprotected void manageThreadDump()
public void onApplicationEvent(JahiaTemplateManagerService.TemplatePackageRedeployedEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<JahiaTemplateManagerService.TemplatePackageRedeployedEvent>public void removeNotCacheableFragment(String key)
ModuleCacheProvider.removeNonCacheableFragmentsByEncodedPath(String)key - public static void flushNotCacheableFragment()
ModuleCacheProvider.flushNonCacheableFragments()Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.