Static cache not found entities

Created on 15 April 2025, 7 days ago

Problem/Motivation

Found via 📌 ContentTranslationHooks::viewsDataAlter() could multiple load config entities Active which I'll postpone on this issue.

That issue was in turn found by 📌 Add database and cache assertions to OpenTelemetryFrontPagePerformanceTest and OpenTelemetryNodePagePerformanceTest Active .

ContentTranslation module referencese a config entity for each possible entity/bundle combination on the system, however, these aren't guaranteed to be in the database. Whether translation is enabled for a bundle can be checked multiple times per request, so this can mean an attempt to load the entity/bundle from the system multiple times.

We can statically cache not found entities in the same static cache we use for found entities (using different keys), this should allow us to transparently avoid trying to load those entities multiple times.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

entity system

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024