Package freemarker.ext.util
Class ModelCache
java.lang.Object
freemarker.ext.util.ModelCache
- Direct Known Subclasses:
BeansModelCache
Internally used by various wrapper implementations to implement model
caching.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected abstract TemplateModelgetInstance(Object object)booleanprotected abstract booleanisCacheable(Object object)voidsetUseCache(boolean useCache)Sets whether this wrapper caches model instances.
-
Constructor Details
-
ModelCache
protected ModelCache()
-
-
Method Details
-
setUseCache
public void setUseCache(boolean useCache)Sets whether this wrapper caches model instances. Default is false. When set to true, callinggetInstance(Object)multiple times for the same object will return the same model. -
getUseCache
public boolean getUseCache()- Since:
- 2.3.21
-
getInstance
-
create
-
isCacheable
-
clearCache
public void clearCache()
-