freemarker.template
Interface TemplateCache

All Known Implementing Classes:
FileTemplateCache

public abstract interface TemplateCache

An interface for self-updating caches of compiled Templates.


Method Summary
 void addCacheListener(CacheListener listener)
          Registers a CacheListener for this TemplateCache.
 Template getTemplate(java.lang.String name)
          Gets a template from the cache.
 void removeCacheListener(CacheListener listener)
          Unregisters a CacheListener for this TemplateCache.
 void startAutoUpdate()
          Begins automatic updates of the cache.
 void stopAutoUpdate()
          Stops automatically updating the cache.
 

Method Detail

addCacheListener

public void addCacheListener(CacheListener listener)
Registers a CacheListener for this TemplateCache.
Parameters:
CacheListener - the CacheListener to be registered.
See Also:
CacheListener

removeCacheListener

public void removeCacheListener(CacheListener listener)
Unregisters a CacheListener for this TemplateCache.
Parameters:
CacheListener - the CacheListener to be unregistered.
See Also:
CacheListener

getTemplate

public Template getTemplate(java.lang.String name)
Gets a template from the cache.
Parameters:
name - a string uniquely identifying the template.
Returns:
the template corresponding to the name, or null if not found.

startAutoUpdate

public void startAutoUpdate()
Begins automatic updates of the cache.

stopAutoUpdate

public void stopAutoUpdate()
Stops automatically updating the cache.