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.
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<String,Object> |
DEFAULT_EXPRESSION_CACHE_VALIDITY_CHECKER
Default expression cache validity checker: null
|
static int |
DEFAULT_FRAGMENT_CACHE_INITIAL_SIZE
Default fragment cache initial size: 20
|
static String |
DEFAULT_FRAGMENT_CACHE_LOGGER_NAME
Default fragment cache logger name: null (default behaviour = org.thymeleaf.TemplateEngine.cache.FRAGMENT_CACHE)
|
static int |
DEFAULT_FRAGMENT_CACHE_MAX_SIZE
Default fragment cache maximum size: 300
|
static String |
DEFAULT_FRAGMENT_CACHE_NAME
Default fragment cache name: "FRAGMENT_CACHE"
|
static boolean |
DEFAULT_FRAGMENT_CACHE_USE_SOFT_REFERENCES
Default fragment cache "use soft references" flag: true
|
static ICacheEntryValidityChecker<String,List<Node>> |
DEFAULT_FRAGMENT_CACHE_VALIDITY_CHECKER
Default fragment cache validity checker: null
|
static int |
DEFAULT_MESSAGE_CACHE_INITIAL_SIZE
Default message cache initial size: 20
|
static String |
DEFAULT_MESSAGE_CACHE_LOGGER_NAME
Default message cache logger name: null (default behaviour = org.thymeleaf.TemplateEngine.cache.MESSAGE_CACHE)
|
static int |
DEFAULT_MESSAGE_CACHE_MAX_SIZE
Default message cache maximum size: 300
|
static String |
DEFAULT_MESSAGE_CACHE_NAME
Default message cache name: "MESSAGE_CACHE"
|
static boolean |
DEFAULT_MESSAGE_CACHE_USE_SOFT_REFERENCES
Default message cache "use soft references" flag: true
|
static ICacheEntryValidityChecker<String,Properties> |
DEFAULT_MESSAGE_CACHE_VALIDITY_CHECKER
Default message 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<String,Template> |
DEFAULT_TEMPLATE_CACHE_VALIDITY_CHECKER
Default template cache validity checker: an instance of
StandardParsedTemplateEntryValidator . |
Constructor and Description |
---|
StandardCacheManager() |
clearAllCaches, getAllSpecificCacheNames, getExpressionCache, getFragmentCache, getMessageCache, 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<String,Template> DEFAULT_TEMPLATE_CACHE_VALIDITY_CHECKER
StandardParsedTemplateEntryValidator
.public static final String DEFAULT_FRAGMENT_CACHE_NAME
public static final int DEFAULT_FRAGMENT_CACHE_INITIAL_SIZE
public static final int DEFAULT_FRAGMENT_CACHE_MAX_SIZE
public static final boolean DEFAULT_FRAGMENT_CACHE_USE_SOFT_REFERENCES
public static final String DEFAULT_FRAGMENT_CACHE_LOGGER_NAME
public static final ICacheEntryValidityChecker<String,List<Node>> DEFAULT_FRAGMENT_CACHE_VALIDITY_CHECKER
public static final String DEFAULT_MESSAGE_CACHE_NAME
public static final int DEFAULT_MESSAGE_CACHE_INITIAL_SIZE
public static final int DEFAULT_MESSAGE_CACHE_MAX_SIZE
public static final boolean DEFAULT_MESSAGE_CACHE_USE_SOFT_REFERENCES
public static final String DEFAULT_MESSAGE_CACHE_LOGGER_NAME
public static final ICacheEntryValidityChecker<String,Properties> DEFAULT_MESSAGE_CACHE_VALIDITY_CHECKER
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<String,Object> DEFAULT_EXPRESSION_CACHE_VALIDITY_CHECKER
protected final ICache<String,Template> initializeTemplateCache()
initializeTemplateCache
in class AbstractCacheManager
protected final ICache<String,List<Node>> initializeFragmentCache()
initializeFragmentCache
in class AbstractCacheManager
protected final ICache<String,Properties> initializeMessageCache()
initializeMessageCache
in class AbstractCacheManager
protected final ICache<String,Object> initializeExpressionCache()
initializeExpressionCache
in class AbstractCacheManager
public String getTemplateCacheName()
public boolean getTemplateCacheUseSoftReferences()
public int getTemplateCacheInitialSize()
public int getTemplateCacheMaxSize()
public String getTemplateCacheLoggerName()
public ICacheEntryValidityChecker<String,Template> getTemplateCacheValidityChecker()
public final org.slf4j.Logger getTemplateCacheLogger()
public String getFragmentCacheName()
public boolean getFragmentCacheUseSoftReferences()
public int getFragmentCacheInitialSize()
public int getFragmentCacheMaxSize()
public String getFragmentCacheLoggerName()
public ICacheEntryValidityChecker<String,List<Node>> getFragmentCacheValidityChecker()
public final org.slf4j.Logger getFragmentCacheLogger()
public String getMessageCacheName()
public boolean getMessageCacheUseSoftReferences()
public int getMessageCacheInitialSize()
public int getMessageCacheMaxSize()
public String getMessageCacheLoggerName()
public ICacheEntryValidityChecker<String,Properties> getMessageCacheValidityChecker()
public final org.slf4j.Logger getMessageCacheLogger()
public String getExpressionCacheName()
public boolean getExpressionCacheUseSoftReferences()
public int getExpressionCacheInitialSize()
public int getExpressionCacheMaxSize()
public String getExpressionCacheLoggerName()
public ICacheEntryValidityChecker<String,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<String,Template> templateCacheValidityChecker)
public void setFragmentCacheName(String fragmentCacheName)
public void setFragmentCacheInitialSize(int fragmentCacheInitialSize)
public void setFragmentCacheMaxSize(int fragmentCacheMaxSize)
public void setFragmentCacheUseSoftReferences(boolean fragmentCacheUseSoftReferences)
public void setFragmentCacheLoggerName(String fragmentCacheLoggerName)
public void setFragmentCacheValidityChecker(ICacheEntryValidityChecker<String,List<Node>> fragmentCacheValidityChecker)
public void setMessageCacheName(String messageCacheName)
public void setMessageCacheInitialSize(int messageCacheInitialSize)
public void setMessageCacheMaxSize(int messageCacheMaxSize)
public void setMessageCacheUseSoftReferences(boolean messageCacheUseSoftReferences)
public void setMessageCacheLoggerName(String messageCacheLoggerName)
public void setMessageCacheValidityChecker(ICacheEntryValidityChecker<String,Properties> messageCacheValidityChecker)
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<String,Object> expressionCacheValidityChecker)
Copyright © 2016 The THYMELEAF team. All rights reserved.