-
Improvement
-
Resolution: Duplicate
-
Major
-
None
-
4.4.3
-
None
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
- duplicates
-
MAGNOLIA-3699 Cache Header Negotiation
- Closed