Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Work in progress Stale

90566[WIP][TASK] Warmup database cache listening to `CacheWarmupEvent`

Stefan Bürk CR 0 V 0 Normal +81 −1 updated 06/18/26, 23:07

Commit message

TYPO3 uses a dedicated `database_schema` cache, holding
database schema information. It is currently only
renewed when database schema changes are applied or a
cold database cache is reached, for example after the
cache has been flushed.

Cli command `cache:warmup` is there to rebuild caches
and/or process other related tasks after caches have
been rebuild. The cli command dispatches the PSR-14
`CacheWarmupEvent` to allow reacting and extending
what is executed for `cache:warmup`.

The change adds `ConnectionPool::cacheWarmup()`
and registers it method as an PSR-14 event listener
iterating over all configured connections to warmup
the cache information.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 17
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/66/90566/17 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/66/90566/17 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Relation chain 4

  1. main 90957[WIP][!!!][TASK] Disable converting values by default in `Connection` Based on this change Abandoned Stefan Bürk CR 0 V 0 Normal +78 −54

    The chain has patch set 8 of 13, the changes above it need a rebase.

  2. main 89293[BUGFIX] Honor parameter types in writable Connection methods Based on this change Merged Stefan Bürk CR +2 V +2 → 14.3 Hard +385 −22

    The chain has patch set 9 of 40, the changes above it need a rebase.

  3. 90566 [WIP][TASK] Warmup database cache listening to `CacheWarmupEvent` This change

  4. main 90788[TASK] Avoid costly database schema queries and class state This change is based on it Merged Stefan Bürk CR +2 V +2 → 13.4 Normal +20 −50

    The chain has patch set 15 of 16, the changes above it need a rebase.

Issues 7

Files 2

Review log 2946

Show 1321 earlier messages
  1. Stefan Bürk uploaded patch set 1 09/04/25, 19:08

  2. core-ci voted on patch set 1 V +1 09/04/25, 19:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84395

  3. Stefan Bürk uploaded patch set 2 V +1 09/04/25, 19:22

  4. core-ci voted on patch set 2 V +1 09/04/25, 19:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84396

  5. Stefan Bürk uploaded patch set 3 V +1 09/04/25, 20:50

  6. core-ci voted on patch set 3 V +1 09/04/25, 21:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84398

  7. Stefan Bürk rebased onto patch set 4 09/05/25, 08:43

    Copied Votes: * Verified+1 (copy condition: "**changekind:NO_CHANGE**")
  8. core-ci voted on patch set 4 V +1 09/05/25, 08:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84445

  9. Stefan Bürk rebased onto patch set 5 V +1 09/05/25, 18:36

  10. core-ci voted on patch set 5 V +1 09/05/25, 18:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84492

  11. Stefan Bürk abandoned the change 09/06/25, 12:48

    no need to add warmup, filesystem based cache needs to vanish due to multiple reasons and flaws
  12. Stefan Bürk restored the change 10/01/25, 08:36

  13. Stefan Bürk marked it work in progress 10/01/25, 08:37

  14. Stefan Bürk uploaded patch set 6 V +1 10/01/25, 08:37

  15. core-ci voted on patch set 6 V +1 10/01/25, 08:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85791

  16. Stefan Bürk uploaded patch set 7 V +1 10/01/25, 09:05

  17. core-ci voted on patch set 7 V +1 10/01/25, 09:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85792

  18. Stefan Bürk updated the commit message in patch set 8 V +1 10/01/25, 09:11

  19. core-ci voted on patch set 8 V +1 10/01/25, 09:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85793

  20. Stefan Bürk uploaded patch set 9 V +1 10/06/25, 14:27

  21. Stefan Bürk marked it ready for review 10/06/25, 14:27

  1. core-ci voted on patch set 9 V +1 10/06/25, 14:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86075

  2. Stefan Bürk rebased onto patch set 10 V +1 10/07/25, 08:19

  3. core-ci voted on patch set 10 V +1 10/07/25, 08:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86137

  4. Stefan Bürk rebased onto patch set 11 V +1 10/07/25, 13:21

  5. core-ci voted on patch set 11 V +1 10/07/25, 13:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86164

  6. Stefan Bürk rebased onto patch set 12 V +1 10/07/25, 17:39

  7. core-ci voted on patch set 12 V +1 10/07/25, 17:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86175

  8. Stefan Bürk rebased onto patch set 13 V +1 10/07/25, 17:52

  9. core-ci voted on patch set 13 V +1 10/07/25, 18:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86178

  10. Stefan Bürk rebased onto patch set 14 V +1 10/08/25, 10:08

  11. core-ci voted on patch set 14 V +1 10/08/25, 10:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86218

  12. Stefan Bürk uploaded patch set 15 V +1 10/08/25, 18:40

  13. core-ci voted on patch set 15 V +1 10/08/25, 18:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86253

  14. Christian Kuhn updated the commit message in patch set 16 V +1 10/09/25, 00:07

  15. Christian Kuhn voted on patch set 16 CR +1 V +1 10/09/25, 00:07

  16. core-ci voted on patch set 16 V +1 10/09/25, 00:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86259

  17. Benjamin Franzke commented on patch set 16 10/09/25, 08:44

    ConnectionPool.php:490

    Hm, `system` group was meant for file-sourced caches [1] and could be warmed up even if the system is not installed yet or databse was unavailable. This makes this group dependant on a working database connection. Would you mind adding a new group (like `db`?) for `database_schema` cache in order to allow developers to control which caches should be warmed up? An example where this could become problematic is: If a build server, that prepares a new release, runs `bin/typo3 cache:warmup -g system` it may not have access to the database and cache warmup would fail. (Disclaimer: I'm not aware of such setups, but it's theoretically possible if paths on build server and live server match) [1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.4/Feature-93436-IntroduceCacheWarmupConsoleCommand.html#:~:text=Note%20that%20file,with%20one%20release.
  18. Stefan Bürk commented on patch set 16 10/09/25, 10:03

    ConnectionPool.php:490 Reply

    I get your point, and generally I have no objections not doing so. You pointed out possible deployment strategies where it may be a problem, and this is a serous point to discuss. The other side is, that currently the "database_schema" cache is already part of the `system` cache group, and a `bin/typo3 cache:flush -g system` would flush it, which is also part of deplyment strategies in pre-symlink changes (when using non-file cache backends, for example redis using release version based prefixes/container instances or similar). The need to flush the `db` cache now explicitly and **could** be felt as "breaking". So we may discuss further things how to proceed: * nail it down to main only and change cache group for `database_schema` ? * keep main & 13.4 and change cache group with a important restfile ? * keep main & 13.4 and keep the cache group definition, adding a important restfile lining out how to reconfigure the "cache group" for the "database_schema" cache and replace the TYPO3 EventListener to adjust the cache group check (hasGroup()`. Thinking about that ... would it not be better to check "hasGroup()" against the value(s) defined in the cache configuration for the `database_schema` cache, which would reduce required steps for instances to simple reconfigure the cache group and have it dedicated (splitting database_schema into dedicated db group). From my view there is no real good solution, but we need to find the "less-impacting/hurting" out of the "not so good" solutions. Not sure, need to think about it but wanted to share my thoughts on that first to allow others thinking about it with more information/arguments.
  19. Benni Mack commented on patch set 16 10/09/25, 13:51

    ConnectionPool.php:490 Reply

    Well, I have similar concerns than bnf, but I got a more "funny" use-case / example: We use "cache:warmup" in CI, and on the prod machines, we use "extension:setup" to set up the new DB fields within the DB. We should at least document the best practice (or whatever practice you consider best)
  20. Christian Kuhn commented on patch set 16 10/09/25, 14:11

    ConnectionPool.php:490 Reply

    afaik there are more issues with 'warmup on different system, and deyloy warmed up caches stuff to live', for instance when absolute paths are written to cache files and staging lives on different paths. unsure if that is still the case with whatever we warmup currently, though.
  21. Stefan Bürk marked it work in progress 10/10/25, 09:47

  22. Stefan Bürk updated the commit message in patch set 17 CR +1 V +1 10/10/25, 09:47

  23. Stefan Bürk commented on patch set 17 10/10/25, 09:51

    ConnectionPool.php:490 Reply Unresolved

    Put change to WIP and restricted it to `main` only for now. There is no urgent need to backport this to 13.4, and in case some needs it it can be archieved with a dedicated extension implementing a listener. Based on the discussion and limiting it to main only we can move the `database_schema` cache to a dedicated cache group like `db` making this a `breaking` feature as it would target `cache:flush` also. Let's keep the change laying around for a couple of days so we can think about what to exactly do without pressure. Thanks to the insights and discussion arguments from all of you.
  24. core-ci voted on patch set 17 V +1 10/10/25, 09:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86377

  25. Christian Kuhn wrote 06/18/26, 23:07

    Removed reviewer Christian Kuhn.