Project

General

Profile

Actions

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.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-02-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Gerrit Code Review 9 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83012

Actions #2

Updated by Benjamin Franzke about 1 month ago

  • 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.

Actions #3

Updated by Benjamin Franzke about 1 month ago

  • Status changed from Rejected to Needs Feedback
Actions #4

Updated by Philipp Kitzberger about 1 month ago

I can confirm that Benjamin's example is working as described.

Actions #5

Updated by Gerrit Code Review about 1 month ago

  • Status changed from Needs Feedback to Under Review

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83012

Actions #6

Updated by Benjamin Franzke 17 days ago

  • Status changed from Under Review to Rejected
Actions

Also available in: Atom PDF