Grails
  1. Grails
  2. GRAILS-5560

GroovyPagesTemplateEngine does not cache compiled templates for several variants of createTemplate

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2-RC1, 1.2-RC2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      There are a lot of createTemplate variants on the engine, but very few of them actually attempt to get a page from the cache.

      In particular createTemplate(String content, String pageName) never attempts to cache.

      Surely we can generate a page name for caching purposes that is based on an SHA1 digest of the source template? This may take a little while to compute, but likely a lot less time than compiling the template and leaking permgen? Even then, the digest is only needed if there is no way to tell the engine what the lastmod time is of the template. If there is an extra variant:

      createTemplate(String content, String pageName, Date lastModified)

      ...then this problem can be circumvented also.

        Issue Links

          Activity

            People

            • Assignee:
              Graeme Rocher
              Reporter:
              Marc Palmer
            • Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Last Reviewed:

                Development