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

Create the possibility to prevent caching of a page.

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Major
    • None
    • 4.4.3
    • cache
    • None

    Description

      In both large projects that I implemented for now, I needed a solution to exclude a template from caching. As a workaround, I created an url voter to exclude specific urls by regex patterns, but this is a hardcoded version that does not always work nicely.

      At the moment, it is only possible to exclude requests from cache BEFORE the filter chain is processed to the end. This means, that the decision of caching or not cannot be influenced by any code after the CacheFilter, because the CachePolicyBehaviour and the according Executor have already been chosen.

      I could imagine the possibility to call

      CacheFilter.getInstance().excludeRequestFromCache() //(or something similar in MgnlContext)

      from anywhere in the code.

      Unfortunately I do not see how this could be achieved after investigating the caching code for quite a while. So I can't include a suggestion or even a patch.

      Thanks fo help
      Stefan

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                sbaur Stefan Baur
                Daniel Kummer, Raphael Joss
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD