Problem/Motivation
When the field enhancer depends on something external to the entity for example configuration, it's cachability meta-data should be able to bubble during the normalization process.
As it is on 8.x-3.4 this is not possible to define, leading to sometimes frustrated clients and the need to whipe the whole page / render / cdn cache to reflect a simple config change.
Proposed resolution
If this was resolved in future versions of the module - point me there.
Otherwise this is a valid bug and as I see it, we should either extend the use of the $context
parameter or change the API.
Remaining tasks
TBD.
User interface changes
TBD.
API changes
TBD.
Data model changes
TBD.
Release notes snippet
TBD.
Original report by [username]
TBD.
Issue fork jsonapi_extras-3071310
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
e0ipso@ndobromirov I am very interested on this. Did you end up writing a patch for your project?
Comment #3
ndobromirov CreditAttribution: ndobromirov at FFW commentednot yet
Comment #4
ndobromirov CreditAttribution: ndobromirov at FFW commentedThis was mainly because of lack of time and somewhat lack of direction to dive in.
My initial idea was to have the context argument have a special key in there - related to the cacheability.
But I think it's better to have an explocit interface for that... Maybe a new (or some existing) interface to be implemented per enhancer and the using code to do feature detection based on the interface and boubble the cachability metadata...
No idea... Need to get into it, but this will be not sooner than 2-3 weeks from now :(
Comment #5
e0ipsoAll that sounds good!
Just knowing it's still on your radar is good enough for me!
Comment #6
bbralaHi @ndobromirov, been a while, you still want to get this going?
Comment #7
bbralaAnother year later, still no update unfortunately. Any chance you can still make this happen?
Comment #8
bradjones1I need this and I'm doing it!
Comment #10
bradjones1Comment #11
bbralaAwesome! I've tested locally, good to get this in, well done :)