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

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

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

origin: org.wisdom-framework/thymeleaf-template-engine

/**
 * Clears the cache when a template have been updated.
 */
public synchronized void updatedTemplate() {
  // Synchronized because of the access to engine.
  engine.getCacheManager().clearAllCaches();
}
origin: org.wisdom-framework/thymeleaf-template-engine

/**
 * Deletes the given template. The service is unregistered, and the cache is cleared.
 *
 * @param template the template
 */
public void deleteTemplate(ThymeLeafTemplateImplementation template) {
  // 1 - unregister the service
  try {
    ServiceRegistration reg = registrations.remove(template);
    if (reg != null) {
      reg.unregister();
    }
  } catch (Exception e) { //NOSONAR
    // May already have been unregistered during the shutdown sequence.
  }
  // 2 - as templates can have dependencies, and expressions kept in memory, we clear all caches.
  // Despite this may really impact performance, it should not happen too often on real systems.
  synchronized (this) {
    engine.getCacheManager().clearAllCaches();
  }
  OgnlRuntime.clearCache();
  // Unfortunately, the previous method do not clear the get and set method cache
  // (ognl.OgnlRuntime.cacheGetMethod and ognl.OgnlRuntime.cacheSetMethod)
  clearMethodCaches();
}
org.thymeleaf.cacheICacheManagerclearAllCaches

Javadoc

Clears all the caches managed by this cache manager instance.

This method is mainly intended for use from external tools that might need to clean all caches completely, without having to worry about implementation details.

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
  • 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
  • Top Vim 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