Problem/Motivation
When using tokens that very by user, date or something like that, the block is cached without considering the relevant cache contexts/tags.
Proposed resolution
Use the bubbleable metadata to attach it to the render array.
Remaining tasks
Check if other token replacements need to be updated too, tests
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2833328-allow-markup.patch | 1.28 KB | cr0ss |
| #2 | token-bubbleable-metadata-2833328-2.patch | 1.13 KB | berdir |
Comments
Comment #2
berdirComment #4
berdirI think this can't be tested as it still works due to automatic bubbling. assuming that we're in a normal render context.
Comment #6
cr0ss commentedThis looks good and works as expected with one problem - we don't have markup now and for a bunch of blocks it makes sense to have
for example.
I'm attaching patch just to hear if this solution and bring any problems?