[MAGNOLIA-3770] Create the possibility to prevent caching of a page. Created: 26/Jul/11  Updated: 28/Jul/11  Resolved: 28/Jul/11

Status: Closed
Project: Magnolia
Component/s: cache
Affects Version/s: 4.4.3
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Stefan Baur Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
duplicate
duplicates MAGNOLIA-3699 Cache Header Negotiation Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Visible to:
Daniel Kummer, Raphael Joss

 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



 Comments   
Comment by Jan Haderka [ 28/Jul/11 ]

This issue duplicates MAGNOLIA-3699

Comment by Stefan Baur [ 28/Jul/11 ]

yes, thats exactly what I was looking for. thx.

Generated at Mon Feb 12 03:49:30 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.