Interface | Description |
---|---|
CacheStorage |
Cache storage abstracts away the storage aspects of a cache - associating
an object with a key, retrieval and removal via the key.
|
ConcurrentCacheStorage |
An optional interface for cache storage that knows whether it can be
concurrently accessible without synchronization.
|
StatefulTemplateLoader |
Interface that can be implemented by template loaders that maintain some
sort of internal state (i.e. caches of earlier lookups for performance
optimization purposes etc.) and support resetting of their state.
|
TemplateLoader |
FreeMarker loads template "files" through objects that implement this interface,
thus the templates need not be real files, and can come from any kind of data source
(like classpath, servlet context, database, etc).
|
Class | Description |
---|---|
ClassTemplateLoader |
A
TemplateLoader that uses streams reachable through
Class.getResourceAsStream(String) as its source of templates. |
FileTemplateLoader |
A
TemplateLoader that uses files in a specified directory as the
source of templates. |
MruCacheStorage |
A cache storage that implements a two-level Most Recently Used cache.
|
MultiTemplateLoader |
A
TemplateLoader that uses a set of other loaders to load the templates. |
NullCacheStorage |
A cache storage that doesn't store anything.
|
SoftCacheStorage |
Soft cache storage is a cache storage that uses
SoftReference
objects to hold the objects it was passed, therefore allows the garbage
collector to purge the cache when it determines that it wants to free up
memory. |
StringTemplateLoader |
A
TemplateLoader that uses a Map with Strings as its source of
templates. |
StrongCacheStorage |
Strong cache storage is a cache storage that simply wraps a
Map . |
TemplateCache |
Performs caching and on-demand loading of the templates.
|
URLTemplateLoader |
This is an abstract template loader that can load templates whose
location can be described by an URL.
|
WebappTemplateLoader |
A
TemplateLoader that uses streams reachable through
ServletContext.getResource(String) as its source of templates. |
Template loading and caching. Beside the actual template cache, it contains loaders that can load template files from the file system, from the classpath, or from a web application context. If you have specific needs, you can plug custom template loaders into the system by implementing the template loader interface.