Quantcast
Viewing all articles
Browse latest Browse all 295549

The views "Serializer" style plugin does not collect cacheable metadata from the serialization system

Problem/Motivation

\Drupal\rest\Plugin\views\style\Serializer::render calls off to the serialization system. Since Serialization API now allows explicit bubbling of cacheability metadata from normalizers
, it's possible for normalizers to indicate cacheable metadata.

By not collecting and bubbling this metadata, caching is not applied correctly for views configured with this style plugin.

Steps to reproduce

  1. Create a view that shows serialized entities.
  2. Add a normalizer with some custom cacheable metadata.
  3. See the metadata is never attached to the cache entries generated by rendering the view.

Proposed resolution

  1. Collect cacheable metadata.
  2. Apply that metadata to the views responses generated with the style plugin.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 295549


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