You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Christian Meunier (JIRA)" <ji...@apache.org> on 2007/09/25 00:32:36 UTC
[jira] Commented: (WW-1661) Implementation of Freemarker caching
for Struts2
[ https://issues.apache.org/struts/browse/WW-1661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42253 ]
Christian Meunier commented on WW-1661:
---------------------------------------
Unless i am mistaken, after looking at the code, i am pretty sure the key used to cache the template is weak, the templateName is not enough.
For example, freemarker let you leverage something like this:
foo_us.ftl
foo_fr.ftl
When you ask for foo.ftl, it will choose the correct one depending of the locale, so the very same template name (foo.ftl) can lead to N templates ( 2 in my examples).
This bevahiour can be turned off but i dont think it's the default, ideally, this caching module should detect if this feature is turned off/on and compute cache key accordingly (if enabled, append the locale to the template name)
Regards
> Implementation of Freemarker caching for Struts2
> ------------------------------------------------
>
> Key: WW-1661
> URL: https://issues.apache.org/struts/browse/WW-1661
> Project: Struts 2
> Issue Type: Improvement
> Components: Views
> Affects Versions: 2.0.3
> Reporter: Tom Schneider
> Assignee: Rene Gielen
> Fix For: 2.0.10, 2.1.0
>
> Attachments: struts2-freemarker-caching.patch
>
>
> See: http://jira.opensymphony.com/browse/WW-1417
> Here is a patch that implements caching for freemarker component templates. This patch should be applied against the FreemarkerTemplateEngine.java.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.