Review main Merged

92982[TASK] Introduce dedicated AJAX routes for cache clearing actions

Benjamin Kott CR +2 V +2 Hard +250 −135 updated 02/26/26, 12:35

Commit message

The toolbar clear cache actions previously pointed at the `tce_db`
route, which does not return a structured JSON response. As a result,
success notifications after clearing caches from the toolbar dropdown
were silently suppressed. The page cache clearing in the records and
page module used the `records_clearpagecache` route via a GET request,
which also did not return distinct title and message fields.

To fix this, a new `ClearCacheController` is introduced with dedicated
action methods for flushing the page cache group, all caches, and a
single page cache. Each action returns a consistent JSON response with
a title and message that is displayed as a backend notification. Three
new AJAX routes replace the previous ones.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 18

Review log 1520

  1. Benjamin Kott uploaded patch set 1 02/24/26, 14:10

  2. Benjamin Kott uploaded patch set 2 02/24/26, 14:31

  3. core-ci voted on patch set 2 V -1 02/24/26, 14:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96750

  4. Benjamin Kott uploaded patch set 3 V -1 02/24/26, 15:00

  5. core-ci voted on patch set 1 V -1 02/24/26, 15:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96747

  6. core-ci voted on patch set 3 V +1 02/24/26, 15:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96758

  7. Benjamin Kott uploaded patch set 4 V +1 02/24/26, 16:10

  8. core-ci voted on patch set 4 V +1 02/24/26, 16:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96766

  9. Benjamin Kott rebased onto patch set 5 V +1 02/24/26, 22:10

  10. core-ci voted on patch set 5 V +1 02/24/26, 22:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96781

  11. Simon Schaufelberger commented on patch set 5 02/24/26, 22:59

    locallang_cache.xlf:32

    I would remove the dots in the end from here and below in the others. Otherwise I can already see some patches from Riccardo coming in 😊
  12. Benjamin Franzke voted on patch set 5 CR +1 V +1 02/25/26, 05:41

  13. Benjamin Kott commented on patch set 5 02/25/26, 06:47

    locallang_cache.xlf:32 Reply

    I am not sure, this is a complete sentence intended to be placed here, and it ends with a ".". When there will be changes afterwards, i am fine - but i see no reason to remove them for now.
  14. Simon Schaufelberger voted on patch set 5 CR +1 V +1 02/25/26, 09:17

  15. Benjamin Franzke voted on patch set 5 CR +2 V +2 02/25/26, 09:21

  16. Benjamin Franzke merged patch set 6 02/25/26, 09:22

  17. Benni Mack commented on patch set 6 02/25/26, 11:36

    ClearCacheToolbarItem.php:90

    tbh, this change is a bit critical. Well, we have the cacheActions, and we have a PSR-14 Event right after that creation of this list. I know quite a few who hook into this and create their own "hrefs" now, and if we change the property from "href" / "link" to "endpoint" we could / should now at least document this (no talking about a breaking change) so extension authors dont have a hard time... please keep this is mind for next time.
  18. Simon Schaufelberger commented on patch set 6 02/25/26, 15:54

  19. Benjamin Kott commented on patch set 6 02/26/26, 08:43

    ClearCacheToolbarItem.php:90 Reply

    will have a look and provide a followup
  20. Benjamin Kott commented on patch set 6 02/26/26, 12:35

    ClearCacheToolbarItem.php:90 Reply

    Please see: 93011: [BUGFIX] Migrate old href cache actions to endpoint | https://review.typo3.org/c/Packages/TYPO3.CMS/+/93011