Problem/Motivation
Certain token types (current-page, user) can create major caching problems since their bubbleable metadata is not added to the imagefield_tokens render array.
Proposed resolution
Update the formatter such that bubbleable metadata from the tokesn is added to the render array.
Remaining tasks
Patch to follow.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
TBD
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | imagefield_tokens--cache--3112488--3.patch | 3.53 KB | danflanagan8 |
Comments
Comment #2
danflanagan8Here's a patch that I think adds the right cacheable metadata to the render array, accounting for tokens that have been replaced. I also updated a test so this update has test coverage.I uploaded the wrong patch here. Please ignore.
Comment #3
danflanagan8Comment #4
danflanagan8Here's the correct patch. I believe it resolves this issue and adds test coverage.
Comment #5
akyrylenko commented↑ Please ignore my patch above, it's related to wrong branch ↑
Hi there,
Patch works for me.
Tested on D8.8.1, module version 8.x-2.x
Comment #6
akyrylenko commentedComment #7
ysamoylenko commentedHello @danflanagan8,
Thanks for your great patch.
@akyrylenko, thank you for review.
The patch will be committed soon.
Comment #9
ysamoylenko commentedThe patch was committed.
Thanks everyone for your contribution to the module development.