Tabnine Logo
ICacheManager.getTemplateCache
Code IndexAdd Tabnine to your IDE (free)

How to use
getTemplateCache
method
in
org.thymeleaf.cache.ICacheManager

Best Java code snippets using org.thymeleaf.cache.ICacheManager.getTemplateCache (Showing top 2 results out of 315)

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: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

/**
 * <p>
 *   This constructor should only be called directly for <p>testing purposes</p>.
 * </p>
 * 
 * @param configuration the configuration being currently used.
 */
public TemplateRepository(final Configuration configuration) {
  
  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());
  }
}

org.thymeleaf.cacheICacheManagergetTemplateCache

Javadoc

Returns the cache of parsed templates. Keys are the template names, as specified at the org.thymeleaf.TemplateEngine#process(String,org.thymeleaf.context.IContext)method.

Popular methods of ICacheManager

  • getExpressionCache
    Returns the cache of expression evaluation artifacts. This cache is meant to store artifacts of d
  • clearAllCaches
    Clears all the caches managed by this cache manager instance. This method is mainly intended for
  • getFragmentCache
    Returns the cache of template code fragments. These fragments are pieces of template code that need
  • getMessageCache
    Returns the cache used for externalized/internationalized messages. This cache uses as keys the t

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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