Problem/Motivation
The same problem as already described in #3253880: Caching not properly working when using Tokens in Views also persists for the mustache_views sub-module.
Steps to reproduce
Proposed resolution
Two workarounds to prevent caching conflicts:
- Disable caching for the View (click on
Caching:within Views UI display config and choose "None") - Add a contextual filter that would then automatically include the cache context beforehand. For example when using the node coming from the URL, then you need to add a contextual filter for it. You can do so by choosing "Global: Null" within contextual filters,
and then select "Provide a default value" -> "Content ID from URL".
The Context Stack module might be able to solve this situation in the future by introducing cache contexts for entities. Related issue: #3253876: Provide cache contexts for entities and other objects
Remaining tasks
Find a proper solution path and fix the bug.
Comments
Comment #2
mxh commentedComment #4
mxh commentedComment #6
mxh commentedA lot of optimization work was done and is available in the latest beta release. When using one of the workaround variants as described above, you should be good to go. Nevertheless, this issue remains on Needs work in order to try a more elegant solution path. Maybe there is a way to attache the cacheability metadata beforehand somehow.
Comment #7
mxh commented