Multiple render caching

Created on 13 February 2017, almost 8 years ago
Updated 15 January 2025, 21 days ago

Problem/Motivation

Follow-up from 🐛 getViewBuilder('node')->viewMultiple() bypasses render cache Needs work see also the discussion there.

When rendering multiples of the same thing - say a list of ten nodes, we cache both the overall list and each individual node.

With a cold cache, there can be a benefit to multiple loading both the nodes themselves, and entities that are referenced - i.e. if each node view renders some author information, the author entities could be loaded together too.

Since render cache misses operate at the level of the individual rendered item - i.e. one node at a time rather than multiple, this isn't currently possible to do.

Proposed resolution

Theoretically it should be possible to cache get items at the same level of a render array, keep track of the cache misses, then run a callback on all the cache misses together. So if we have ten nodes, and eight are a cache miss, a callback gets a chance to operate on the eight misses (loading the nodes and any referenced entities in preparation for rendering).

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Closed: outdated

Version

11.0 🔥

Component

render system

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024