#102123Duplicate cache & dependency injection cache corruption in chroot environment
Description
TYPO3’s core cache identifiers are partially based on the directory it is run in, like the dependency injection cache identifier is generated like
// TYPO3\CMS\Core\Package\Cache\PackageDependentCacheIdenifier, line 37
$this->baseIdentifier = (new Typo3Version())->getVersion() . Environment::getProjectPath() . ($packageManager->getCacheIdentifier() ?? '');
The webserver with PHP-FPM runs in the normal root environment, having a full path like /var/www/vhost/…/sites/mysite/…. The scheduler runs in the chroot environment with a path like /sites/mysite/….
This leads to two different cache identifiers for the the DI cache container as well as cached TCA, ext_localconf.php and more. The Problem with the DI cache is that it purges other files, when the cache is written with a new identifier leading to problems with dependency injection.
The behaviour is the same in TYPO3 CMS 11, 12 and current main branch.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[BUGFIX] Duplicate cache & dependency injection cache corruption in chroot environment Resolves: #102123 Releases: main