Don't set cache on buildEntities() (and buildReferencedEntities())
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3214981. --> Reported by: [baysaa](https://www.drupal.org/user/1358394) Related to !5 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>ContentEntityViewBuilderTrait (or new buildFieldTrait) trait's buildEntities method sets #cache on the $element it returns. However $element is not a single render array, it's an array of render arrays. </p>
issue