Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DDST-54] add node_list and media_list cache tags #13

Merged
merged 7 commits into from
Apr 25, 2024
Merged

Conversation

JojoVes
Copy link
Contributor

@JojoVes JojoVes commented Apr 17, 2024

Without the node_list cache tag, manifests made from child nodes don't always get updated when new child nodes are added.

Without the media_list cache tag, manifests that get updated after a referenced media is deleted don't always get updated when a new relevant media entity gets added.

The common ground for both of these points is that the entity references involved are one-way: the media references the node, and the child node references the parent node. So, if an environment has other code to trigger updates for entities when they get referenced by other entities then this would not be an issue in that case, since the referenced entities are accounted for as cache dependencies already.

without this, manifests made from child nodes don't always get updated
when new child nodes are added.
Suggested by adam-vessey, and I think this matches the cache api expectations more
closely than messing about with getting the 'cacheability' element of the
context array.
In cases where the media entities get deleted and new ones get added,
there is nothing about the cache dependency on the old media entities or
the node entities that would get updated when new media entities get
added that reference the relevant node.
If it's added only when there is attached media, then the normalization
that's triggered after media is deleted ends up not getting told to
update when new media is added.
@JojoVes JojoVes changed the title [DDST-54] add node_list cache tag [DDST-54] add node_list and media_list cache tags Apr 19, 2024
@JojoVes JojoVes added the patch Backwards compatible bug fixes. label Apr 19, 2024
@JojoVes JojoVes marked this pull request as ready for review April 19, 2024 18:04
@nchiasson-dgi nchiasson-dgi merged commit 1af6951 into main Apr 25, 2024
1 check passed
@nchiasson-dgi nchiasson-dgi deleted the DDST-54 branch April 25, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Backwards compatible bug fixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants