Package org.thymeleaf.cache

Examples of org.thymeleaf.cache.ICacheManager


    private static SpelExpression getExpression(final Configuration configuration, final String spelExpression) {
       
        SpelExpression exp = null;
        ICache<String, Object> cache = null;
       
        final ICacheManager cacheManager = configuration.getCacheManager();
        if (cacheManager != null) {
            cache = cacheManager.getExpressionCache();
            if (cache != null) {
                exp = (SpelExpression) cache.get(SPEL_CACHE_PREFIX + spelExpression);
            }
        }
       
View Full Code Here


    private static SpelExpression getExpression(final Configuration configuration, final String spelExpression) {
       
        SpelExpression exp = null;
        ICache<String, Object> cache = null;
       
        final ICacheManager cacheManager = configuration.getCacheManager();
        if (cacheManager != null) {
            cache = cacheManager.getExpressionCache();
            if (cache != null) {
                exp = (SpelExpression) cache.get(SPEL_CACHE_PREFIX + spelExpression);
            }
        }
       
View Full Code Here

    final String cacheKey = TEMPLATE_CACHE_PREFIX + baseName + "_"+ locale.toString();
   
    Properties properties = null;
    ICache<String, Properties> messagesCache = null;
   
    final ICacheManager cacheManager = arguments.getConfiguration().getCacheManager();
    if (cacheManager != null) {
      messagesCache = cacheManager.getMessageCache();
      if (messagesCache != null) {
        properties = messagesCache.get(cacheKey);
      }
    }
View Full Code Here

    public final List<Node> extractFragment(final Configuration configuration, final List<Node> nodes) {

        DOMSelector selector = null;
        ICache<String,Object> expressionCache = null;
       
        final ICacheManager cacheManager = configuration.getCacheManager();
        if (cacheManager != null) {
            expressionCache = cacheManager.getExpressionCache();
            if (expressionCache != null) {
                selector = (DOMSelector) expressionCache.get(this.domSelectorCacheKey);
            }
        }
       
View Full Code Here

        final String cacheKey = CLASS_CACHE_PREFIX + className + "_" + locale.toString();
       
        ICache<String,Properties> messagesCache = null;
        Properties properties = null;
       
        final ICacheManager cacheManager = configuration.getCacheManager();
        if (cacheManager != null) {
            messagesCache = cacheManager.getMessageCache();
            if (messagesCache != null) {
                properties = messagesCache.get(cacheKey);
            }
        }
       
View Full Code Here

        final String cacheKey = TEMPLATE_CACHE_PREFIX + templateName + '_' + locale.toString();

        Properties properties = null;
        ICache<String,Properties> messagesCache = null;
       
        final ICacheManager cacheManager = arguments.getConfiguration().getCacheManager();
        if (cacheManager != null) {
            messagesCache = cacheManager.getMessageCache();
            if (messagesCache != null) {
                properties = messagesCache.get(cacheKey);
            }
        }
       
View Full Code Here

    public final List<Node> extractFragment(final Configuration configuration, final List<Node> nodes) {

        DOMSelector selector = null;
        ICache<String,Object> expressionCache = null;
       
        final ICacheManager cacheManager = configuration.getCacheManager();
        if (cacheManager != null) {
            expressionCache = cacheManager.getExpressionCache();
            if (expressionCache != null) {
                selector = (DOMSelector) expressionCache.get(this.domSelectorCacheKey);
            }
        }
       
View Full Code Here

           
            Object expressionTree = null;
            ICache<String, Object> cache = null;
           
            if (configuration != null) {
                final ICacheManager cacheManager = configuration.getCacheManager();
                if (cacheManager != null) {
                    cache = cacheManager.getExpressionCache();
                    if (cache != null) {
                        expressionTree = cache.get(OGNL_CACHE_PREFIX + expression);
                    }
                }
            }
View Full Code Here

       
        super();
       
        Validate.notNull(configuration, "Configuration object cannot be null");
       
        final ICacheManager cacheManager = configuration.getCacheManager();
        if (cacheManager == null) {
            this.templateCache = null;
            this.fragmentCache = null;
        } else {
            this.templateCache = cacheManager.getTemplateCache();
            this.fragmentCache = cacheManager.getFragmentCache();
        }
           
        this.parsersByTemplateMode = new HashMap<String,ITemplateParser>(10, 1.0f);
        for (final ITemplateModeHandler handler : configuration.getTemplateModeHandlers()) {
            this.parsersByTemplateMode.put(handler.getTemplateModeName(), handler.getTemplateParser());
View Full Code Here

    }
   

   
    private static Object getFromCache(final Configuration configuration, final String input, final String prefix) {
        final ICacheManager cacheManager = configuration.getCacheManager();
        if (cacheManager != null) {
            final ICache<String,Object> cache = cacheManager.getExpressionCache();
            if (cache != null) {
                return cache.get(prefix + input);
            }
        }
        return null;
View Full Code Here

TOP

Related Classes of org.thymeleaf.cache.ICacheManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.