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

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

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

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.cacheICacheManagergetFragmentCache

Javadoc

Returns the cache of template code fragments. These fragments are pieces of template code that need to be parsed before adding them to the template DOM being processed.

Typical examples of these fragments are externalized/internationalized messages like:

home.header=Welcome to the <i>fruit market</i>!

...which are used in templates like th:utext="#{home.header}", and therefore need parsing in order to be converted to a DOM subtree (because that "<i>" should be a DOM element by itself).

Keys in this cache are the String representation of fragments themselves along with the template mode used for such parsing (like "{HTML5}Welcome to the <i>fruit market</i>"), and values are the list of DOM Nodes that correspond to parsing each fragment.

Important: this fragments are not related to th:fragment processors.

Popular methods of ICacheManager

  • getExpressionCache
    Returns the cache of expression evaluation artifacts. This cache is meant to store artifacts of d
  • getTemplateCache
    Returns the cache of parsed templates. Keys are the template names, as specified at the org.thymele
  • clearAllCaches
    Clears all the caches managed by this cache manager instance. This method is mainly intended for
  • getMessageCache
    Returns the cache used for externalized/internationalized messages. This cache uses as keys the t

Popular in Java

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setScale (BigDecimal)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Notification (javax.management)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • From CI to AI: The AI layer in your organization
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