Review 13.4 Merged

88968[BUGFIX] Respect condition state for PageTSConfig runtime cache

Stefan Bürk CR +2 V +2 Normal +115 −36 updated 04/07/25, 23:11

Commit message

The method `BackendUtility::getPagesTSconfig()` has been using
a two level cache since #100701 to reduce the memory footprint.

Technically, a cache entry `pageTsConfig-pid-to-hash-<uid>` is
written pointing to a concrete PageTsConfig instance based on
relevant cache data. The goal was to reuse a `PageTsConfig`
instance when the config does not differ because it is inherited
from the rootline.

However, this approach missed the fact that even with the same
basic content, conditions can be evaluated differently for
distinct pages which can result in a different PageTsConfigArray.

This change adds a hash of the matched conditions to the second
cache level. As a consequence, the TS configuration has to be
evaluated at least once for each distinct page UID.

In other words, this change trades off runtime performance for
correctness.

It may be possible to investigate and find a broader approach to
improve performance by doing the condition evaluation independent
of the TS configuration parsing, but this is out of scope and needs
to be done in dedicated change.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
  • Verified V +2 Done
    • Stefan Bürk +2
    • core-ci +1 CI

Issues 2

Files 6

Review log 34

  1. Stefan Bürk commented on patch set 1 04/07/25, 23:00

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 04/07/25, 23:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77167

  3. Stefan Bürk voted on patch set 1 CR +2 V +2 04/07/25, 23:11

  4. Stefan Bürk merged patch set 2 04/07/25, 23:11