public class ModuleCacheProvider extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationListener<JahiaTemplateManagerService.TemplatePackageRedeployedEvent>
| Constructor and Description |
|---|
ModuleCacheProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
addNonCacheableFragment(String key)
Set the given fragment key as non-cacheable
|
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
|
void |
flushCaches() |
void |
flushChildrenDependenciesOfPath(String path,
boolean propagateToOtherClusterNodes)
Flush Children dependencies of a specific path
|
void |
flushNonCacheableFragments()
Flush the non-cacheable fragments list
|
void |
flushRegexpDependenciesOfPath(String path,
boolean propagateToOtherClusterNodes)
Flushes dependencies if the provided node path matches the corresponding key in the
REGEXPDEPS_CACHE_NAME} cache. |
net.sf.ehcache.Cache |
getCache() |
net.sf.ehcache.Cache |
getDependenciesCache() |
static ModuleCacheProvider |
getInstance() |
CacheKeyGenerator |
getKeyGenerator() |
net.sf.ehcache.Cache |
getRegexpDependenciesCache() |
net.sf.ehcache.Cache |
getSyncCache() |
void |
invalidate(Collection<String> nodePathOrIdentifiers,
boolean propagateToOtherClusterNodes) |
void |
invalidate(String nodePathOrIdentifier)
Flushes all the cache entries, related to the specified node.
|
void |
invalidate(String nodePathOrIdentifier,
boolean propagateToOtherClusterNodes)
Flushes all the cache entries, related to the specified node.
|
void |
invalidateRegexp(String key) |
void |
invalidateRegexp(String key,
boolean propagateToOtherClusterNodes) |
boolean |
isNonCacheableFragment(String key)
Check if fragment key is known as non-cacheable
|
void |
onApplicationEvent(JahiaTemplateManagerService.TemplatePackageRedeployedEvent templatePackageRedeployedEvent) |
void |
propagateChildrenDependenciesFlushToCluster(String path,
boolean propagateToOtherClusterNodes) |
void |
propagateFlushRegexpDependenciesOfPath(String key,
boolean propagateToOtherClusterNodes) |
void |
propagatePathFlushToCluster(String nodePathOrIdentifier) |
void |
removeNonCacheableFragmentsByEncodedPath(String key)
Remove keys from the non-cacheable fragments list by path encoded in the cache key given as parameter
|
void |
setAggregateCacheFilter(AggregateCacheFilter aggregateCacheFilter) |
void |
setCacheProvider(EhCacheProvider cacheProvider) |
void |
setJcrSessionFactory(JCRSessionFactory jcrSessionFactory)
Deprecated.
|
void |
setKeyGenerator(CacheKeyGenerator keyGenerator)
Injects the cache key generator implementation.
|
public static ModuleCacheProvider getInstance()
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException - in the event of misconfiguration (such as failure to
set an essential property) or if initialization fails.public void invalidate(String nodePathOrIdentifier)
nodePathOrIdentifier - the node path or node uuid to be invalidated.public void invalidate(String nodePathOrIdentifier, boolean propagateToOtherClusterNodes)
nodePathOrIdentifier - the node path or node uuid to be invalidated.propagateToOtherClusterNodes - do notify replicators of this eventpublic void invalidate(Collection<String> nodePathOrIdentifiers, boolean propagateToOtherClusterNodes)
public net.sf.ehcache.Cache getCache()
public net.sf.ehcache.Cache getDependenciesCache()
public CacheKeyGenerator getKeyGenerator()
public void setCacheProvider(EhCacheProvider cacheProvider)
public void setKeyGenerator(CacheKeyGenerator keyGenerator)
keyGenerator - the cache key generator implementation to usepublic void flushCaches()
public net.sf.ehcache.Cache getRegexpDependenciesCache()
public void invalidateRegexp(String key)
public void invalidateRegexp(String key, boolean propagateToOtherClusterNodes)
public void propagateFlushRegexpDependenciesOfPath(String key, boolean propagateToOtherClusterNodes)
public void propagateChildrenDependenciesFlushToCluster(String path, boolean propagateToOtherClusterNodes)
public void flushChildrenDependenciesOfPath(String path, boolean propagateToOtherClusterNodes)
path - path to flush all its children cachepropagateToOtherClusterNodes - true if it should propagate to other cluster nodespublic void flushRegexpDependenciesOfPath(String path, boolean propagateToOtherClusterNodes)
REGEXPDEPS_CACHE_NAME} cache.path - the concerned node pathpropagateToOtherClusterNodes - true in case the flush event should be propagated to other cluster nodespublic void addNonCacheableFragment(String key)
key - fragment keypublic void removeNonCacheableFragmentsByEncodedPath(String key)
key - fragment key of the fragmentpublic void flushNonCacheableFragments()
public boolean isNonCacheableFragment(String key)
key - fragment keypublic void propagatePathFlushToCluster(String nodePathOrIdentifier)
@Deprecated public void setJcrSessionFactory(JCRSessionFactory jcrSessionFactory)
public net.sf.ehcache.Cache getSyncCache()
public void setAggregateCacheFilter(AggregateCacheFilter aggregateCacheFilter)
public void onApplicationEvent(JahiaTemplateManagerService.TemplatePackageRedeployedEvent templatePackageRedeployedEvent)
onApplicationEvent in interface org.springframework.context.ApplicationListener<JahiaTemplateManagerService.TemplatePackageRedeployedEvent>Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.