Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6677

Remove FTL 5sec cache in Developer mode

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4.6
    • Fix Version/s: 5.4.8, 5.5
    • Component/s: None
    • Labels:
      None
    • Release notes required:
      Yes
    • Documentation update required:
      Yes
    • Sprint:
      Basel 48
    • Story Points:
      2
    • Magnolia Release:
      5.4.8, 5.5

      Description

      Currently FTL files are cached for 5 seconds when they are requested. In developer mode this should be removed to improve developer experience of the responsiveness of Magnolia to their changes. This will also enable using a "hot browser reload" mechanism like BrowserSync or LiveReload.

      Symptom:
      Change an ftl file. Refresh the webpage and see the change instantly.
      Change the ftl file again. Refresh the webpage before 5 seconds elapsed and you will not see the change. Only after 5 seconds have elapsed since the last change was rendered will the new change be rendered.

      Notes:
      freemarker.cache.TemplateCache sets the default refresh delay to 5s

      The 'FTL lock' problem is solvable by doing this at L123 in FreemarkerHelper:

       cfg.setTemplateUpdateDelay(0);

      As this change will negatively impact performance, it should only be appllied when developer mode is enabled.

      Documentation:
      Please document also in a section about all the changes that developer mode activates.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ilgun Ilgun Ilgun
              Reporter:
              czimmermann Christopher Zimmermann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: