public class StandardCacheManager extends AbstractCacheManager
Standard implementation of ICacheManager
, returning
configurable instances of StandardCache
for each of
the default caches defined at the cache manager interface.
Each cache allows the configuration of the following parameters:
ICacheEntryValidityChecker
,
which will be applied on each entry upon retrieval from cache in order to ensure
it is still valid and can be used.
Note a class with this name existed since 2.0.0, but it was completely reimplemented in Thymeleaf 3.0
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_EXPRESSION_CACHE_INITIAL_SIZE
Default expression cache initial size: 100
|
static String |
DEFAULT_EXPRESSION_CACHE_LOGGER_NAME
Default expression cache logger name: null (default behaviour = org.thymeleaf.TemplateEngine.cache.EXPRESSION_CACHE)
|
static int |
DEFAULT_EXPRESSION_CACHE_MAX_SIZE
Default expression cache maximum size: 500
|
static String |
DEFAULT_EXPRESSION_CACHE_NAME
Default expression cache name: "EXPRESSION_CACHE"
|
static boolean |
DEFAULT_EXPRESSION_CACHE_USE_SOFT_REFERENCES
Default expression cache "use soft references" flag: true
|
static ICacheEntryValidityChecker<ExpressionCacheKey,Object> |
DEFAULT_EXPRESSION_CACHE_VALIDITY_CHECKER
Default expression cache validity checker: null
|
static int |
DEFAULT_TEMPLATE_CACHE_INITIAL_SIZE
Default template cache initial size: 10
|
static String |
DEFAULT_TEMPLATE_CACHE_LOGGER_NAME
Default template cache logger name: null (default behaviour = org.thymeleaf.TemplateEngine.cache.TEMPLATE_CACHE)
|
static int |
DEFAULT_TEMPLATE_CACHE_MAX_SIZE
Default template cache maximum size: 50
|
static String |
DEFAULT_TEMPLATE_CACHE_NAME
Default template cache name: "TEMPLATE_CACHE"
|
static boolean |
DEFAULT_TEMPLATE_CACHE_USE_SOFT_REFERENCES
Default template cache "use soft references" flag: true
|
static ICacheEntryValidityChecker<TemplateCacheKey,TemplateModel> |
DEFAULT_TEMPLATE_CACHE_VALIDITY_CHECKER
Default template cache validity checker: an instance of
StandardParsedTemplateEntryValidator . |
Constructor and Description |
---|
StandardCacheManager() |
clearAllCaches, getAllSpecificCacheNames, getExpressionCache, getSpecificCache, getTemplateCache
public static final String DEFAULT_TEMPLATE_CACHE_NAME
public static final int DEFAULT_TEMPLATE_CACHE_INITIAL_SIZE
public static final int DEFAULT_TEMPLATE_CACHE_MAX_SIZE
public static final boolean DEFAULT_TEMPLATE_CACHE_USE_SOFT_REFERENCES
public static final String DEFAULT_TEMPLATE_CACHE_LOGGER_NAME
public static final ICacheEntryValidityChecker<TemplateCacheKey,TemplateModel> DEFAULT_TEMPLATE_CACHE_VALIDITY_CHECKER
StandardParsedTemplateEntryValidator
.public static final String DEFAULT_EXPRESSION_CACHE_NAME
public static final int DEFAULT_EXPRESSION_CACHE_INITIAL_SIZE
public static final int DEFAULT_EXPRESSION_CACHE_MAX_SIZE
public static final boolean DEFAULT_EXPRESSION_CACHE_USE_SOFT_REFERENCES
public static final String DEFAULT_EXPRESSION_CACHE_LOGGER_NAME
public static final ICacheEntryValidityChecker<ExpressionCacheKey,Object> DEFAULT_EXPRESSION_CACHE_VALIDITY_CHECKER
protected final ICache<TemplateCacheKey,TemplateModel> initializeTemplateCache()
initializeTemplateCache
in class AbstractCacheManager
protected final ICache<ExpressionCacheKey,Object> initializeExpressionCache()
initializeExpressionCache
in class AbstractCacheManager
public String getTemplateCacheName()
public boolean getTemplateCacheUseSoftReferences()
public int getTemplateCacheInitialSize()
public int getTemplateCacheMaxSize()
public String getTemplateCacheLoggerName()
public ICacheEntryValidityChecker<TemplateCacheKey,TemplateModel> getTemplateCacheValidityChecker()
public final org.slf4j.Logger getTemplateCacheLogger()
public String getExpressionCacheName()
public boolean getExpressionCacheUseSoftReferences()
public int getExpressionCacheInitialSize()
public int getExpressionCacheMaxSize()
public String getExpressionCacheLoggerName()
public ICacheEntryValidityChecker<ExpressionCacheKey,Object> getExpressionCacheValidityChecker()
public final org.slf4j.Logger getExpressionCacheLogger()
public void setTemplateCacheName(String templateCacheName)
public void setTemplateCacheInitialSize(int templateCacheInitialSize)
public void setTemplateCacheMaxSize(int templateCacheMaxSize)
public void setTemplateCacheUseSoftReferences(boolean templateCacheUseSoftReferences)
public void setTemplateCacheLoggerName(String templateCacheLoggerName)
public void setTemplateCacheValidityChecker(ICacheEntryValidityChecker<TemplateCacheKey,TemplateModel> templateCacheValidityChecker)
public void setExpressionCacheName(String expressionCacheName)
public void setExpressionCacheInitialSize(int expressionCacheInitialSize)
public void setExpressionCacheMaxSize(int expressionCacheMaxSize)
public void setExpressionCacheUseSoftReferences(boolean expressionCacheUseSoftReferences)
public void setExpressionCacheLoggerName(String expressionCacheLoggerName)
public void setExpressionCacheValidityChecker(ICacheEntryValidityChecker<ExpressionCacheKey,Object> expressionCacheValidityChecker)
Copyright © 2016 The THYMELEAF team. All rights reserved.