Review main Merged

86548[TASK] Stateless SiteFinder

Christian Kuhn CR +2 V +2 Normal +68 −120 updated 10/10/24, 12:44

Commit message

The SiteFinder is an often injected service, but
its stateful due to cache properties and suffers
from improper cache eviction when SiteWriter
changes site configuration.

Note the overall class construct / separation of
SiteConfiguration, SiteFinder and some related
classes is a bit unfortunate and naming is not
perfect. We may want to review these constructs
in v14 again.

* Avoid sites property altogether since it is a
  1:1 call of SiteConfiguration->getAllExistingSites(),
  which has its own cache.
* Declare readonly.
* Use runtimeCache for "root id to identifier mapping",
  get runtimeCache injected.
* Avoid loading all sites within __construct()! Do this
  on demand instead.
* Listen on SiteConfigurationChangedEvent (by SiteWriter)
  to remove the runtime cache for automatic cache eviction
  on site changes.
* Adapt some test cases.

Review

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

Issues 2

Files 5

Review log 1117

  1. Christian Kuhn uploaded patch set 1 10/10/24, 10:44

  2. core-ci voted on patch set 1 V -1 10/10/24, 10:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67496

  3. Christian Kuhn uploaded patch set 2 V -1 10/10/24, 10:59

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

  5. Christian Kuhn updated the commit message in patch set 3 V +1 10/10/24, 11:07

  6. Christian Kuhn updated the commit message in patch set 4 10/10/24, 11:08

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

  8. core-ci voted on patch set 3 V +1 10/10/24, 11:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67498

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

  10. core-ci voted on patch set 5 V +1 10/10/24, 11:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67501

  11. Christian Kuhn uploaded patch set 6 V +1 10/10/24, 11:25

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

  13. Stefan Bürk voted on patch set 6 CR -1 10/10/24, 11:42

  14. Stefan Bürk voted on patch set 6 CR +1 V +1 10/10/24, 11:52

  15. Oli Bartsch voted on patch set 6 CR +1 V +1 10/10/24, 12:37

  16. Christian Kuhn voted on patch set 6 CR +2 V +2 10/10/24, 12:44

  17. Christian Kuhn merged patch set 7 10/10/24, 12:44