Search in sources :

Example 1 with MruCacheStorage

use of freemarker.cache.MruCacheStorage in project perun by CESNET.

the class PerunNotifTemplateManagerImpl method createFreemarkerConfiguration.

private Configuration createFreemarkerConfiguration(StringTemplateLoader stringTemplateLoader) {
    Configuration newConfiguration = new Configuration();
    newConfiguration.setTagSyntax(Configuration.ANGLE_BRACKET_TAG_SYNTAX);
    newConfiguration.setDefaultEncoding("utf-8");
    newConfiguration.setLocalizedLookup(true);
    newConfiguration.setCacheStorage(new MruCacheStorage(10, 100));
    newConfiguration.setTemplateLoader(stringTemplateLoader);
    return newConfiguration;
}
Also used : Configuration(freemarker.template.Configuration) MruCacheStorage(freemarker.cache.MruCacheStorage)

Aggregations

MruCacheStorage (freemarker.cache.MruCacheStorage)1 Configuration (freemarker.template.Configuration)1