public class BroadleafThymeleaf3CacheProcessor
extends org.thymeleaf.processor.element.AbstractAttributeModelProcessor
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_NAME |
protected javax.cache.Cache |
cache |
protected org.broadleafcommerce.presentation.cache.service.TemplateCacheKeyResolverService |
cacheKeyResolver |
protected org.broadleafcommerce.common.extensibility.cache.JCacheUtil |
jcacheUtil |
protected org.broadleafcommerce.common.config.service.SystemPropertiesService |
systemPropertiesService |
| Constructor and Description |
|---|
BroadleafThymeleaf3CacheProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToCache(String cacheKey,
org.thymeleaf.model.IModel model,
org.thymeleaf.context.ITemplateContext context,
Map<String,String> tagAttributes) |
protected Object |
checkCacheForElement(Map<String,String> tagAttributes,
String cacheKey)
If this template was found in cache, adds the response to the element and returns true.
|
protected void |
doProcess(org.thymeleaf.context.ITemplateContext iContext,
org.thymeleaf.model.IModel model,
org.thymeleaf.engine.AttributeName attributeName,
String attributeValue,
org.thymeleaf.processor.element.IElementModelStructureHandler structureHandler) |
javax.cache.Cache |
getCache() |
boolean |
isCachingEnabled() |
protected void |
replaceTagWithCache(String cachedObject,
org.thymeleaf.model.IModel model,
org.thymeleaf.context.ITemplateContext context) |
void |
setCache(javax.cache.Cache cache) |
protected boolean |
shouldCache(String attributeValue,
org.broadleafcommerce.presentation.model.BroadleafTemplateContext context) |
doProcessgetDialectPrefix, getMatchingAttributeName, getMatchingElementName, processgetPrecedence, getTemplateModepublic static final String ATTR_NAME
protected javax.cache.Cache cache
protected org.broadleafcommerce.common.config.service.SystemPropertiesService systemPropertiesService
protected org.broadleafcommerce.presentation.cache.service.TemplateCacheKeyResolverService cacheKeyResolver
protected org.broadleafcommerce.common.extensibility.cache.JCacheUtil jcacheUtil
protected void doProcess(org.thymeleaf.context.ITemplateContext iContext,
org.thymeleaf.model.IModel model,
org.thymeleaf.engine.AttributeName attributeName,
String attributeValue,
org.thymeleaf.processor.element.IElementModelStructureHandler structureHandler)
doProcess in class org.thymeleaf.processor.element.AbstractAttributeModelProcessorprotected boolean shouldCache(String attributeValue, org.broadleafcommerce.presentation.model.BroadleafTemplateContext context)
protected Object checkCacheForElement(Map<String,String> tagAttributes, String cacheKey)
arguments - element - protected void replaceTagWithCache(String cachedObject, org.thymeleaf.model.IModel model, org.thymeleaf.context.ITemplateContext context)
protected void addToCache(String cacheKey, org.thymeleaf.model.IModel model, org.thymeleaf.context.ITemplateContext context, Map<String,String> tagAttributes)
public javax.cache.Cache getCache()
public void setCache(javax.cache.Cache cache)
public boolean isCachingEnabled()
Copyright © 2021. All rights reserved.