Review 13.4 Merged

90973[BUGFIX] Ensure additional cache tags are applied for localized pages

Benni Mack CR +2 V +2 Easy +46 −4 updated 10/09/25, 13:32

Commit message

When rendered pages are being cached, appropriate cache tags in the form
`pages_<pageId>` and `pageId_<pageId>` are added. This applies to pages
in the default language as well as to localized pages. In contrast to
pages in the default language, cache tags for localized pages are added
using the page id of their corresponding page record in default
language. This way, pages in the default language as well as localized
pages are tagged as `pages_1` and `pageId_1`, for example, if the page
uid of the page in the default language is `1`.

This is due to historical reasons: When the `pages_language_overlay`
table still existed, an additional tagging of localized pages using
their localized page uid was performed. However, when this table got
merged with the `pages` table, the additional tagging for localized
pages using their localized page uid was not taken over and thus did not
applied anymore.

With this patch, the previous behavior is now restored: Once a localized
page is requested, an additional cache tag using the localized page uid
is now applied. This way, localized pages are now tagged with the
default page uid as well as the localized page uid.

Given the following scenario:

    * Default page uid: 1
    * Localized page uid (DE): 2
    * Localized page uid (CZ): 3

The following cache tags are now generated:

+-----------------------+----------------+----------------+
|                       | Old behavior   | New behavior   |
+-----------------------+----------------+----------------+
| Default page          | * `pages_1`    | * `pages_1`    |
| (page uid=1)          | * `pageId_1`   | * `pageId_1`   |
+-----------------------+----------------+----------------+
| Localized page (DE)   | * `pages_1`    | * `pages_1`    |
| (page uid=2)          | * `pageId_1`   | * `pageId_1`   |
|                       |                | * `pages_2`    |
|                       |                | * `pageId_2`   |
+-----------------------+----------------+----------------+
| Localized page (CZ)   | * `pages_1`    | * `pages_1`    |
| (page uid=3)          | * `pageId_1`   | * `pageId_1`   |
|                       |                | * `pages_3`    |
|                       |                | * `pageId_3`   |
+-----------------------+----------------+----------------+

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 4

Review log 34

  1. Benni Mack commented on patch set 1 10/09/25, 13:18

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 10/09/25, 13:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86306

  3. Benni Mack voted on patch set 1 CR +2 V +2 10/09/25, 13:32

  4. Benni Mack merged patch set 2 10/09/25, 13:32