Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293522

Cacheability of normalized computed fields' properties should be bubbled

$
0
0

Updated in #80

Problem/Motivation

Let's say I have computed field with the string value which shows the current time of the request. Right now there is no way to set cachebality metadata for computed fields so jsonapi shows the time of serialization instead of current time in the response.

Proposed resolution

Proposal 1

Allow computed field item list class to provide cacheable metadata. Using CacheableDependencyTrait. See JsonApiComputedFieldItemList in #37.

Proposal 2

Allow PrimitiveDataNormalizer to set the cacheable metadata. Using RefinableCacheableDependencyTrait and PrimitiveDataNormalizer should bubble it. See the patch in #75

Remaining tasks

Decide the approach.

User interface changes

None

API changes

API addition so that computed fields/properties can bubble the cacheable metadata.

Data model changes

Depends on the proposal


Viewing all articles
Browse latest Browse all 293522

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>