Bug #103127
closed
CLI command cache:flush not respecting caches without explicit group set
Added by Robert Kärner 9 months ago.
Updated 17 days ago.
Description
The CLI command `typo3 cache:flush` does not respect custom defined caches in extensions, unless they explicitly define a cache group in their configuration.
- Status changed from New to Under Review
- Status changed from Under Review to Rejected
Can not reproduce, tested with:
ext_localconf.php
use TYPO3\CMS\Core\Cache\Frontend\VariableFrontend;
use TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['mycache'] = [
'frontend' => VariableFrontend::class,
'backend' => SimpleFileBackend::class,
];
Follow commands reveal that flushing works:
mkdir typo3temp/var/cache/data/mycache
touch typo3temp/var/cache/data/mycache/foo
bin/typo3 cache:flush
LC_ALL=C ls typo3temp/var/cache/data/mycache/foo
ls: cannot access 'typo3temp/var/cache/data/mycache/foo': No such file or directory
Note that the cache-group all
is assigned due to default-cache-configuration and will be returned by the CacheManager (if your cache is properly registered in ext_localconf.php
). This group is then included in the CacheFlushEvent and will be flushed by the CacheManager flush-event-handler.
- Status changed from Rejected to Needs Feedback
I can confirm that Benjamin's example is working as described.
- Status changed from Needs Feedback to Under Review
- Status changed from Under Review to Rejected
Also available in: Atom
PDF