Class TemplateCache

java.lang.Object
freemarker.cache.TemplateCache

public class TemplateCache extends Object
Performs caching and on-demand loading of the templates. The actual template "file" loading is delegated to a TemplateLoader that you can specify in the constructor. Some aspects of caching is delegated to a CacheStorage that you can also specify in the constructor.

Typically you don't instantiate or otherwise use this class directly. The Configuration embeds an instance of this class, that you access indirectly through Configuration.getTemplate(String) and other Configuration API-s. Then TemplateLoader and CacheStorage can be set with Configuration.setTemplateLoader(TemplateLoader) and Configuration.setCacheStorage(CacheStorage).