static <V> void putIntoCache(final IEngineConfiguration configuration, final String input, final V value, final String type) { final ICacheManager cacheManager = configuration.getCacheManager(); if (cacheManager != null) { final ICache<ExpressionCacheKey,Object> cache = cacheManager.getExpressionCache(); if (cache != null) { cache.put(new ExpressionCacheKey(type,input), value); } } }
readMethod = propertyDescriptor.getReadMethod(); if (readMethod != null && expressionCache != null) { expressionCache.put(cacheKey, readMethod);
this.templateCache.put(cacheKey, templateModel);
this.templateCache.put(cacheKey, parsedTemplate);
this.templateCache.put(cacheKey, templateModel);
this.templateCache.put(cacheKey, templateModel);
public void put(final K key, final V value) { this.cache.put((K)prefix(key), value); }
public void put(final K key, final V value) { this.cache.put((K)prefix(key), value); }
private static <V> void putIntoCache(final Configuration configuration, final String input, final V value, final String prefix) { final ICacheManager cacheManager = configuration.getCacheManager(); if (cacheManager != null) { final ICache<String,Object> cache = cacheManager.getExpressionCache(); if (cache != null) { cache.put(prefix + input, value); } } }
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); } } if (selector == null) { selector = new DOMSelector(this.selectorExpression); if (expressionCache != null) { expressionCache.put(this.domSelectorCacheKey, selector); } } final List<Node> extraction = selector.select(nodes, this.referenceChecker); if (extraction == null || extraction.size() == 0) { return null; } return extraction; }
messagesCache.put(cacheKey, properties);
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); } } if (selector == null) { selector = new DOMSelector(this.selectorExpression); if (expressionCache != null) { expressionCache.put(this.domSelectorCacheKey, selector); } } final DOMSelector.INodeReferenceChecker referenceChecker = getReferenceChecker(configuration); final List<Node> extraction = selector.select(nodes, referenceChecker); if (extraction == null || extraction.size() == 0) { return null; } return extraction; }
messagesCache.put(cacheKey, properties);
private static ComputedSpelExpression getExpression(final IEngineConfiguration configuration, final String spelExpression) { ComputedSpelExpression exp = null; ICache<ExpressionCacheKey, Object> cache = null; final ICacheManager cacheManager = configuration.getCacheManager(); if (cacheManager != null) { cache = cacheManager.getExpressionCache(); if (cache != null) { exp = (ComputedSpelExpression) cache.get(new ExpressionCacheKey(EXPRESSION_CACHE_TYPE_SPEL,spelExpression)); } } if (exp == null) { final SpelExpression spelExpressionObject = (SpelExpression) PARSER.parseExpression(spelExpression); final boolean mightNeedExpressionObjects = StandardExpressionUtils.mightNeedExpressionObjects(spelExpression); exp = new ComputedSpelExpression(spelExpressionObject, mightNeedExpressionObjects); if (cache != null && null != exp) { cache.put(new ExpressionCacheKey(EXPRESSION_CACHE_TYPE_SPEL,spelExpression), exp); } } return exp; }
private static ComputedSpelExpression getExpression(final IEngineConfiguration configuration, final String spelExpression) { ComputedSpelExpression exp = null; ICache<ExpressionCacheKey, Object> cache = null; final ICacheManager cacheManager = configuration.getCacheManager(); if (cacheManager != null) { cache = cacheManager.getExpressionCache(); if (cache != null) { exp = (ComputedSpelExpression) cache.get(new ExpressionCacheKey(EXPRESSION_CACHE_TYPE_SPEL,spelExpression)); } } if (exp == null) { final SpelExpression spelExpressionObject = (SpelExpression) PARSER.parseExpression(spelExpression); final boolean mightNeedExpressionObjects = StandardExpressionUtils.mightNeedExpressionObjects(spelExpression); exp = new ComputedSpelExpression(spelExpressionObject, mightNeedExpressionObjects); if (cache != null && null != exp) { cache.put(new ExpressionCacheKey(EXPRESSION_CACHE_TYPE_SPEL,spelExpression), exp); } } return exp; }
private static ComputedSpelExpression getExpression(final IEngineConfiguration configuration, final String spelExpression) { ComputedSpelExpression exp = null; ICache<ExpressionCacheKey, Object> cache = null; final ICacheManager cacheManager = configuration.getCacheManager(); if (cacheManager != null) { cache = cacheManager.getExpressionCache(); if (cache != null) { exp = (ComputedSpelExpression) cache.get(new ExpressionCacheKey(EXPRESSION_CACHE_TYPE_SPEL,spelExpression)); } } if (exp == null) { // SELECT THE ADEQUATE SpEL EXPRESSION PARSER depending on whether SpEL compilation is enabled final SpelExpressionParser spelExpressionParser = PARSER_WITH_COMPILED_SPEL != null && SpringStandardExpressions.isSpringELCompilerEnabled(configuration)? PARSER_WITH_COMPILED_SPEL : PARSER_WITHOUT_COMPILED_SPEL; final SpelExpression spelExpressionObject = (SpelExpression) spelExpressionParser.parseExpression(spelExpression); final boolean mightNeedExpressionObjects = StandardExpressionUtils.mightNeedExpressionObjects(spelExpression); exp = new ComputedSpelExpression(spelExpressionObject, mightNeedExpressionObjects); if (cache != null && null != exp) { cache.put(new ExpressionCacheKey(EXPRESSION_CACHE_TYPE_SPEL,spelExpression), exp); } } return exp; }
expressionTree = ognl.Ognl.parseExpression(expression); if (cache != null && null != expressionTree) { cache.put(OGNL_CACHE_PREFIX + expression, expressionTree);
private static ComputedSpelExpression getExpression(final IEngineConfiguration configuration, final String spelExpression) { ComputedSpelExpression exp = null; ICache<ExpressionCacheKey, Object> cache = null; final ICacheManager cacheManager = configuration.getCacheManager(); if (cacheManager != null) { cache = cacheManager.getExpressionCache(); if (cache != null) { exp = (ComputedSpelExpression) cache.get(new ExpressionCacheKey(EXPRESSION_CACHE_TYPE_SPEL,spelExpression)); } } if (exp == null) { // SELECT THE ADEQUATE SpEL EXPRESSION PARSER depending on whether SpEL compilation is enabled final SpelExpressionParser spelExpressionParser = PARSER_WITH_COMPILED_SPEL != null && SpringStandardExpressions.isSpringELCompilerEnabled(configuration)? PARSER_WITH_COMPILED_SPEL : PARSER_WITHOUT_COMPILED_SPEL; final SpelExpression spelExpressionObject = (SpelExpression) spelExpressionParser.parseExpression(spelExpression); final boolean mightNeedExpressionObjects = StandardExpressionUtils.mightNeedExpressionObjects(spelExpression); exp = new ComputedSpelExpression(spelExpressionObject, mightNeedExpressionObjects); if (cache != null && null != exp) { cache.put(new ExpressionCacheKey(EXPRESSION_CACHE_TYPE_SPEL,spelExpression), exp); } } return exp; }
private static ComputedSpelExpression getExpression(final IEngineConfiguration configuration, final String spelExpression) { ComputedSpelExpression exp = null; ICache<ExpressionCacheKey, Object> cache = null; final ICacheManager cacheManager = configuration.getCacheManager(); if (cacheManager != null) { cache = cacheManager.getExpressionCache(); if (cache != null) { exp = (ComputedSpelExpression) cache.get(new ExpressionCacheKey(EXPRESSION_CACHE_TYPE_SPEL,spelExpression)); } } if (exp == null) { // SELECT THE ADEQUATE SpEL EXPRESSION PARSER depending on whether SpEL compilation is enabled final SpelExpressionParser spelExpressionParser = PARSER_WITH_COMPILED_SPEL != null && SpringStandardExpressions.isSpringELCompilerEnabled(configuration)? PARSER_WITH_COMPILED_SPEL : PARSER_WITHOUT_COMPILED_SPEL; final SpelExpression spelExpressionObject = (SpelExpression) spelExpressionParser.parseExpression(spelExpression); final boolean mightNeedExpressionObjects = StandardExpressionUtils.mightNeedExpressionObjects(spelExpression); exp = new ComputedSpelExpression(spelExpressionObject, mightNeedExpressionObjects); if (cache != null && null != exp) { cache.put(new ExpressionCacheKey(EXPRESSION_CACHE_TYPE_SPEL,spelExpression), exp); } } return exp; }
this.fragmentCache.put(cacheKey, fragmentNodes); return cloneFragmentNodes(fragmentNodes);