Review main Merged

90285[FEATURE] Add cache:flushtags CLI command

Friedemann Altrock CR +2 V +2 Normal +125 −0 updated 11/23/25, 16:47

Commit message

The `cache:flushtags` CLI command is introduced to delete caches
by tags. Multiple tags can be specified by using a comma-
separated list.

Examples:
* `./vendor/bin/typo3 cache:flushtags pageId_200`
* `./vendor/bin/typo3 cache:flushtags pages_200,pages_300`

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Josef Glatz +1
    • Georg Ringer +1
    • Sascha Nowak +1
  • Verified V +2 Done
    • Benni Mack +2
    • Josef Glatz +1
    • Georg Ringer +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 2636

Show 711 earlier messages
  1. Friedemann Altrock uploaded patch set 1 08/07/25, 22:04

  2. core-ci voted on patch set 1 V +1 08/07/25, 22:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82959

  3. Garvin Hicking commented on patch set 1 08/07/25, 22:46

    Good stuff! (couldn't review yet)

    CacheFlushCommand.php:71

    I would only keep the middle @param here as it has extra value
  4. Garvin Hicking updated the commit message in patch set 2 V +1 08/07/25, 22:47

  5. core-ci voted on patch set 2 V +1 08/07/25, 22:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82966

  6. Friedemann Altrock uploaded patch set 3 V +1 08/08/25, 06:41

  7. Friedemann Altrock commented on patch set 2 08/08/25, 06:41

    CacheFlushCommand.php:71 Reply

    Done
  8. core-ci voted on patch set 3 V +1 08/08/25, 06:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82983

  9. Stefan Bürk updated the commit message in patch set 4 V +1 08/11/25, 00:14

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

  11. Christian Kuhn commented on patch set 4 08/12/25, 22:10

    ok to have something like that. naming things, though: to me, 'flush' is 'kill everything, be sure about it'. having a dedicated flushByTags or clearByTags feels cleaner to me, but i'm not sure?
  1. Sascha Nowak voted on patch set 4 CR +1 V +1 08/15/25, 04:43

  2. Sascha Nowak uploaded patch set 5 CR +1 V +1 08/15/25, 04:51

  3. Sascha Nowak voted on patch set 5 CR +1 V +1 08/15/25, 04:52

  4. core-ci voted on patch set 5 V +1 08/15/25, 04:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83430

  5. Stefan Bürk commented on patch set 5 08/16/25, 22:43

    Reply

    I would also prefer a dedicated command for flushing by tag, and making it required that at least one tag needs to be provided. That would reduce the risk that caches are cleared completly when tags has been missed to be provided. Naming things is hard. ``` bin/typo3 cache:flush:tags bin/typo3 cache:flushByTags # I dislike commands with case sensitive parts bin/typo3 cache:flush-by-tags ... ```
  6. Benni Mack commented on patch set 5 09/10/25, 10:09

    Reply

    "helhum/typo3-console" has cache:flushtags ./vendor/bin/typo3 cache:flushtags news_123 --groups pages,all Let's go with that then.
  7. Sven Liebert uploaded patch set 6 CR +1 V +1 10/22/25, 19:33

  8. Sven Liebert rebased onto patch set 7 10/22/25, 19:43

  9. core-ci voted on patch set 6 V +1 10/22/25, 19:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87294

  10. Sven Liebert commented on patch set 7 10/22/25, 19:49

    Reply

    Done :) Please review again.
  11. core-ci voted on patch set 7 V +1 10/22/25, 19:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87297

  12. Stefan Bürk uploaded patch set 8 10/22/25, 19:57

    Copied Votes: * Verified+1 (copy condition: "**changekind:NO_CHANGE**")
  13. Sascha Nowak commented on patch set 8 10/22/25, 19:57

    CacheFlushTagsCommand.php:33

    You can use DI für the CacheManager: `private readonly CacheManager $cacheManager,`

    CacheFlushTagsCommand.php:34

    This looks unused.

    CacheFlushTagsCommand.php:75

    ```suggestion $this->cacheManager->flushCachesByTags($tags); ```

    CacheFlushTagsCommand.php:79

    ```suggestion $this->cacheManager->flushCachesInGroupByTags($group, $tags); ```
  14. core-ci voted on patch set 8 V +1 10/22/25, 20:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87300

  15. Sven Liebert uploaded patch set 9 V +1 10/23/25, 19:03

  16. Sven Liebert commented on patch set 9 10/23/25, 19:04

    CacheFlushTagsCommand.php:33 Reply

    Done

    CacheFlushTagsCommand.php:34 Reply

    Done

    CacheFlushTagsCommand.php:75 Reply

    Done

    CacheFlushTagsCommand.php:79 Reply

    Done
  17. core-ci voted on patch set 9 V -1 10/23/25, 19:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87439

  18. Sven Liebert uploaded patch set 10 V -1 10/23/25, 19:27

  19. core-ci voted on patch set 10 V +1 10/23/25, 19:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87442

  20. Sascha Nowak voted on patch set 10 CR +1 10/23/25, 20:11

  21. Georg Ringer voted on patch set 10 CR +1 V +1 10/24/25, 08:51

  22. Josef Glatz commented on patch set 10 CR +1 V +1 10/28/25, 07:23

    Works as expected. It's nice to have the possibility to add multiple groups
  23. Benni Mack voted on patch set 10 CR +2 V +2 10/28/25, 16:05

  24. Benni Mack merged patch set 11 10/28/25, 16:05

  25. Stefan Bürk commented on patch set 11 11/23/25, 16:47

    CacheFlushTagsCommand.php:34 Reply

    Using the BootService was correct. The command operates in failsafe mode where most caches are configured with NullBackend instead of the real configuration making the command "use-less". See fix with tests for this: 91839: [BUGFIX] Boot non-failsafe state in `cache:flushtags` command | https://review.typo3.org/c/Packages/TYPO3.CMS/+/91839