Review main Merged

86572[TASK] Avoid adminpanel_requestcache

Christian Kuhn CR +2 V +2 Normal +64 −102 updated 10/13/24, 16:28

Commit message

With #105291 it became obvious that admin panel
MainController->storeData() and render() are called
directly after each other.

storeData() until now created a cache entry to set() into
adminpanel_requestcache, just to be get() it in render()
again.

This triggered serialization of ModuleDataStorageCollection,
which is an \SplObjectStorage, leading to fails when attached
objects contain closures. It also does not play well with
injected services since it can create huge amount of data.

Additionally, adminpanel_requestcache is a database backend
and the serialized data is easily in the range of multiple
megabytes, which leads to massive INSERT and SELECT queries.

ModuleDataStorageCollection should most likely not extend
\SplObjectStorage anymore in the future, but changing this
might a be breaking change for extensions that extend
admin panel in v13.

But we can get rid of adminpanel_requestcache altogether
without being breaking: This step within MainController can
be left out easily, fully avoiding that cache. The patch does
this and fixes the crippled DI in consuming admin panels.

Persisting admin panel data within adminpanel_requestcache
was probably designed to allow extending the admin panel
with a BE module to introspect past requests. This however
never materialized. If such a functionality is added later
it should probably not rely on the core cache infrastructure
since that is a misuse and should come with a redesign of
ModuleDataStorageCollection to avoid serializing the service
objects.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Andreas Nedbal +1
    • Anja Leichsenring +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Andreas Nedbal +1
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 2

Files 14

Review log 1624

  1. Christian Kuhn uploaded patch set 1 10/13/24, 11:28

  2. core-ci voted on patch set 1 V +1 10/13/24, 11:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67686

  3. Christian Kuhn uploaded patch set 2 V +1 10/13/24, 12:08

  4. Christian Kuhn uploaded patch set 3 10/13/24, 12:12

  5. core-ci voted on patch set 2 V +1 10/13/24, 12:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67688

  6. core-ci voted on patch set 3 V +1 10/13/24, 12:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67689

  7. Christian Kuhn updated the commit message in patch set 4 V +1 10/13/24, 12:29

  8. Christian Kuhn updated the commit message in patch set 5 10/13/24, 12:34

  9. core-ci voted on patch set 4 V +1 10/13/24, 12:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67690

  10. Christian Kuhn updated the commit message in patch set 6 10/13/24, 12:35

  11. Christian Kuhn updated the commit message in patch set 7 10/13/24, 12:40

  12. core-ci voted on patch set 7 V +1 10/13/24, 12:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67694

  13. Stefan Bürk voted on patch set 7 CR +1 V +1 10/13/24, 12:57

  14. Stefan Bürk uploaded patch set 8 10/13/24, 13:12

    Copied Votes: * Code-Review+1 (copy condition: "**changekind:NO_CHANGE** OR is:MIN") * Verified+1 (copy condition: "**changekind:NO_CHANGE**")
  15. core-ci voted on patch set 8 V +1 10/13/24, 13:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67695

  16. Christian Kuhn rebased onto patch set 9 CR +1 V +1 10/13/24, 13:55

  17. core-ci voted on patch set 9 V +1 10/13/24, 14:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67699

  18. Stefan Bürk voted on patch set 9 CR +1 V +1 10/13/24, 14:05

  19. Christian Kuhn uploaded patch set 10 10/13/24, 15:41

    Copied Votes: * Code-Review+1 (copy condition: "**changekind:NO_CHANGE** OR is:MIN") * Verified+1 (copy condition: "**changekind:NO_CHANGE**")
  20. core-ci voted on patch set 10 V +1 10/13/24, 15:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67706

  21. Andreas Nedbal voted on patch set 10 CR +1 V +1 10/13/24, 16:22

  22. Anja Leichsenring voted on patch set 10 CR +1 V +1 10/13/24, 16:24

  23. Christian Kuhn voted on patch set 10 CR +2 V +2 10/13/24, 16:27

  24. Christian Kuhn merged patch set 11 10/13/24, 16:28