You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Jasper Rosenberg (JIRA)" <ji...@apache.org> on 2009/07/14 17:30:58 UTC

[jira] Created: (WW-3189) Add support to clear template cache to FreemarkerTemplateEngine

Add support to clear template cache to FreemarkerTemplateEngine
---------------------------------------------------------------

                 Key: WW-3189
                 URL: https://issues.apache.org/struts/browse/WW-3189
             Project: Struts 2
          Issue Type: Improvement
    Affects Versions: 2.1.6
         Environment: Freemarker
            Reporter: Jasper Rosenberg
            Priority: Minor
             Fix For: 2.1.8


In FreemarkerTemplateEngine templates and missingTemplates are private so there is no way to explicitly clear the cache should I need to reload files on demand in a production environment (say via a JMX operation).

Both member variables are thread safe, so it should be easy as just adding a public "void clearTemplateCache()" method which just calls clear() on both collections.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WW-3189) Add support to clear template cache to FreemarkerTemplateEngine

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Musachy Barroso resolved WW-3189.
---------------------------------

    Resolution: Fixed

I changed the visibility to protected and added a public clearTemplatesCache method 

> Add support to clear template cache to FreemarkerTemplateEngine
> ---------------------------------------------------------------
>
>                 Key: WW-3189
>                 URL: https://issues.apache.org/struts/browse/WW-3189
>             Project: Struts 2
>          Issue Type: Improvement
>    Affects Versions: 2.1.6
>         Environment: Freemarker
>            Reporter: Jasper Rosenberg
>            Priority: Minor
>             Fix For: 2.1.8
>
>
> In FreemarkerTemplateEngine templates and missingTemplates are private so there is no way to explicitly clear the cache should I need to reload files on demand in a production environment (say via a JMX operation).
> Both member variables are thread safe, so it should be easy as just adding a public "void clearTemplateCache()" method which just calls clear() on both collections.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.