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

Add support to clear template cache to FreemarkerTemplateEngine

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.6
    • 2.1.8
    • None
    • None
    • 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

            Unassigned Unassigned
            perfnorm Jasper Rosenberg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: