static Object getFromCache(final IEngineConfiguration configuration, final String input, final String type) { final ICacheManager cacheManager = configuration.getCacheManager(); if (cacheManager != null) { final ICache<ExpressionCacheKey,Object> cache = cacheManager.getExpressionCache(); if (cache != null) { return cache.get(new ExpressionCacheKey(type,input)); } } return null; }
readMethod = (Method) expressionCache.get(cacheKey);
final TemplateModel cached = this.templateCache.get(cacheKey); if (cached != null) {
final TemplateModel cached = this.templateCache.get(cacheKey); if (cached != null) { return cached;
final TemplateModel cached = this.templateCache.get(cacheKey);
final TemplateModel cached = this.templateCache.get(cacheKey);
public V get(final K key, final ICacheEntryValidityChecker<? super K, ? super V> validityChecker) { return this.cache.get((K)prefix(key), validityChecker); }
public V get(final K key, final ICacheEntryValidityChecker<? super K, ? super V> validityChecker) { return this.cache.get((K)prefix(key), validityChecker); }
public V get(final K key) { return this.cache.get((K)prefix(key)); }
public V get(final K key) { return this.cache.get((K)prefix(key)); }
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; }
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; }
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 = cacheManager.getMessageCache(); if (messagesCache != null) { properties = messagesCache.get(cacheKey);
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; }
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; }
final List<Node> fragmentNodes = this.fragmentCache.get(cacheKey); if (fragmentNodes != null) { return cloneFragmentNodes(fragmentNodes);