Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3189

Add support to clear template cache to FreemarkerTemplateEngine

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.6
    • Fix Version/s: 2.1.8
    • Component/s: None
    • Labels:
      None
    • Environment:

      Freemarker

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              perfnorm Jasper Rosenberg

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment