Uploaded image for project: 'Magnolia Standard Templating Kit (closed)'
  1. Magnolia Standard Templating Kit (closed)
  2. MGNLSTK-786

far future cache: use a more resource friendly pattern?

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Do
    • Neutral
    • 1.5
    • None
    • base system
    • None

    Description

      We originally got inspired by the GWT approach of using a .timestamp.cache. pattern. But this has the following disadvantages:

      • the filename changes: if one loads js script dynamically one has no clue what the correct pattern would be
      • relative CSS resources (for instance background images) are not having a cache friendly filename

      Solutions:
      A) process the css file and add the timestamp dynamically if needed
      + doable as the files can be freemarker templates (processed CSS)
      - how to know the correct modification date? in case the files are in the DMS?
      - can be very complex

      B) use a path prefix: /cache/timestamp/
      + filename doesn't change
      + relative resources are also cached
      - only works for files which share the parent path (relative urls)
      - the timestamp is shared. if one changes an image one has to touch the CSS file to change its modification date

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                pbaerfuss Philipp Bärfuss
                pbaerfuss Philipp Bärfuss
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: