congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
IEngineConfiguration.getCacheManager
Code IndexAdd Tabnine to your IDE (free)

How to use
getCacheManager
method
in
org.thymeleaf.IEngineConfiguration

Best Java code snippets using org.thymeleaf.IEngineConfiguration.getCacheManager (Showing top 12 results out of 315)

origin: thymeleaf/thymeleaf

/**
 * <p>
 *   Returns the cache manager in effect. This manager is in charge of providing
 *   the various caches needed by the system during its process.
 * </p>
 * <p>
 *   By default, an instance of {@link org.thymeleaf.cache.StandardCacheManager}
 *   is set.
 * </p>
 *
 * @return the cache manager
 */
public final ICacheManager getCacheManager() {
  if (this.initialized) {
    return this.configuration.getCacheManager();
  }
  return this.cacheManager;
}
origin: thymeleaf/thymeleaf

static <V> void removeFromCache(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) {
      cache.clearKey(new ExpressionCacheKey(type,input));
    }
  }
}
origin: thymeleaf/thymeleaf

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;
}
origin: thymeleaf/thymeleaf

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);
    }
  }
}
origin: thymeleaf/thymeleaf

  throws Exception {
final ICacheManager cacheManager = configuration.getCacheManager();
final ICache<ExpressionCacheKey, Object> expressionCache = (cacheManager == null? null : cacheManager.getExpressionCache());
origin: thymeleaf/thymeleaf

final ICacheManager cacheManager = configuration.getCacheManager();
final Set<ITemplateResolver> templateResolvers = configuration.getTemplateResolvers();
final Set<IMessageResolver> messageResolvers = configuration.getMessageResolvers();
origin: thymeleaf/thymeleaf

/**
 * <p>
 *   This constructor should only be called directly for <strong>testing purposes</strong>.
 * </p>
 *
 * @param configuration the engine configuration
 */
public TemplateManager(final IEngineConfiguration configuration) {
  
  super();
  Validate.notNull(configuration, "Configuration cannot be null");
  this.configuration = configuration;
  final ICacheManager cacheManager = this.configuration.getCacheManager();
  if (cacheManager == null) {
    this.templateCache = null;
  } else {
    this.templateCache = cacheManager.getTemplateCache();
  }
  final boolean standardDialectPresent = this.configuration.isStandardDialectPresent();
  // TODO Make these parser implementations configurable: one parser per template mode, then make default implementations extensible/configurable (e.g. AttoParser config)
  this.htmlParser = new HTMLTemplateParser(DEFAULT_PARSER_POOL_SIZE,DEFAULT_PARSER_BLOCK_SIZE);
  this.xmlParser = new XMLTemplateParser(DEFAULT_PARSER_POOL_SIZE, DEFAULT_PARSER_BLOCK_SIZE);
  this.textParser = new TextTemplateParser(DEFAULT_PARSER_POOL_SIZE, DEFAULT_PARSER_BLOCK_SIZE, standardDialectPresent);
  this.javascriptParser = new JavaScriptTemplateParser(DEFAULT_PARSER_POOL_SIZE, DEFAULT_PARSER_BLOCK_SIZE, standardDialectPresent);
  this.cssParser = new CSSTemplateParser(DEFAULT_PARSER_POOL_SIZE, DEFAULT_PARSER_BLOCK_SIZE, standardDialectPresent);
  this.rawParser = new RawTemplateParser(DEFAULT_PARSER_POOL_SIZE, DEFAULT_PARSER_BLOCK_SIZE);
}

origin: thymeleaf/thymeleaf-spring

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;
  
}
origin: org.thymeleaf/thymeleaf-spring3

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;
  
}
origin: thymeleaf/thymeleaf-spring

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;
  
}
origin: thymeleaf/thymeleaf-spring

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;
  
}
origin: org.thymeleaf/thymeleaf-spring4

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;
  
}
org.thymeleafIEngineConfigurationgetCacheManager

Popular methods of IEngineConfiguration

  • getExecutionAttributes
  • getExpressionObjectFactory
  • getTemplateManager
  • getAttributeDefinitions
  • getCDATASectionProcessors
  • getCommentProcessors
  • getDecoupledTemplateLogicResolver
  • getDialectConfigurations
  • getDialects
  • getDocTypeProcessors
  • getElementDefinitions
  • getEngineContextFactory
  • getElementDefinitions,
  • getEngineContextFactory,
  • getLinkBuilders,
  • getMessageResolvers,
  • getModelFactory,
  • getPostProcessors,
  • getPreProcessors,
  • getProcessingInstructionProcessors,
  • getStandardDialectPrefix

Popular in Java

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JButton (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now