...
In addition, you can specify a location (directory on your file system) through the templatePath
or TemplatePath
context variable (in the {{ web.xml
)}. If a variable is specified, the content of the directory it points to will be searched first.
...
You can enable FreeMarker cache mechanism by specifying below options in struts.xml:
<constant name="struts.freemarker.mru.max.strong.size" value="250" />
- this option will be used by freemarker.cache.MruCacheStorage
<constant name="struts.freemarker.templatesCache.updateDelay" value="1800" />
- default update cache interval (5 seconds)
<constant name="struts.freemarker.templatesCache" value="true" />
- *DEPRECATED* this option will use a internal ConcurrentHashMap in FreemarkerTemplateEngine but not freemarker native cache
Settting Setting devMode
to true will disable cache and updateDelay immediately, but you can explicit specify these constants to enable cache even in devMode
, see devMode