- Merge request !2481Issue #3252278: Computed entity reference fields cannot express cacheable metadata β (Open) created by bradjones1
- πΊπΈUnited States bradjones1 Digital Nomad Life
As noted in the comments in #31 that's a hack and while it works is not a definitive solution.
This now conflicts with β¨ Allow specifying `meta` data on JSON:API objects Needs work but is relatively easy to resolve; they are both swimming in the same direction in that they contribute to the cacheability of the normalization.
- π©πͺGermany jan.stoeckler
jan.stoeckler β made their first commit to this issueβs fork.
- Merge request !6353Use field item list cache metadata in JSON:API normalization. β (Open) created by jan.stoeckler
- π©πͺGermany jan.stoeckler
Another attempt with a slightly different approach which might not need an additional interface for empty field item lists, let's see how it goes.
Would appreciate some review, but leaving at 'needs work' due to missing test coverage.
- πΊπΈUnited States bradjones1 Digital Nomad Life
@jan.stockler - Thanks for the MR, however I'm curious how you handle the empty case? It seems to require special handling, unless I'm missing something obvious here.
- πΊπΈUnited States bradjones1 Digital Nomad Life
bradjones1 β changed the visibility of the branch 3252278-jsonapi--computed to hidden.
- πΊπΈUnited States bradjones1 Digital Nomad Life
bradjones1 β changed the visibility of the branch 3252278-jsonapi-computed-field-item-list-cache-metadata to hidden.
- πΊπΈUnited States bradjones1 Digital Nomad Life
bradjones1 β changed the visibility of the branch 11.x to hidden.
- π©πͺGermany jan.stoeckler
@bradjones1
Thanks for the MR, however I'm curious how you handle the empty case? It seems to require special handling, unless I'm missing something obvious here.
Can you elaborate on why empty field item lists need special handling, i seem to be missing or not fully grasping something on that front?
- πΊπΈUnited States bradjones1 Digital Nomad Life
Rebased my MR, no regressions there, this still needs specific test coverage.
- πΊπΈUnited States bradjones1 Digital Nomad Life
bradjones1 β changed the visibility of the branch 3252278-jsonapi-computed-field-item-list-cache-metadata to active.
- πΊπΈUnited States bradjones1 Digital Nomad Life
Can you elaborate on why empty field item lists need special handling, i seem to be missing or not fully grasping something on that front?
Empty lists are empty for a reason. However, if we can't attach cacheability data to that emptiness, then when the empty condition changes (e.g., due to something that does not otherwise cache-invalidate the entity) then you'll never see the new, populated data.