Review main Abandoned

71351[WIP][FEATURE] Add --files-only for cache:flush command

Benni Mack CR 0 V 0 Easy +24 −0 updated 09/29/21, 10:30

Commit message

This change adds the "--files-only" option to the CLI
command "cache:flush".

This was possible with helhum/typo3-console until TYPO3 v11.4
and without this feature, various multi-node / cluster setups with
non-shared caches / filesystems do not work as before.

Review

  • Code review CR 0
  • Verified V 0

Files 1

Review log 67

  1. Benni Mack uploaded patch set 1 09/29/21, 09:19

  2. core-ci voted on patch set 1 V +1 09/29/21, 09:33 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17307

  3. Mathias Brodala commented on patch set 1 09/29/21, 10:07

    CacheFlushCommand.php:152

    Shouldn't we use GeneralUtility::flushDirectory() instead? Otherwise I fear race conditions here.
  4. Benjamin Franzke commented on patch set 1 CR -1 09/29/21, 10:08

    As discussed via Slack: bin/typo3 cache:flush --group system should work and do the same. Other then that I'd prefer not add a wrapper for "rm -rf var/cache/" which can be easily done with bin/typo3.
  5. Mathias Brodala commented on patch set 1 09/29/21, 10:09

    CacheFlushCommand.php:152 Reply Unresolved

    Since that method was dropped: so first rename the directory, then recreate it and finally safely drop the original directory.
  6. Benjamin Franzke commented on patch set 1 09/29/21, 10:10

    Reply

    without bin/typo3 I meant.
  7. Benni Mack abandoned the change 09/29/21, 10:30

    will solve it differently with --group = system