Project

General

Profile

Actions

Bug #102123

open

Duplicate cache & dependency injection cache corruption in chroot environment

Added by Thorben Nissen 7 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2023-10-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
DI, cache, chroot
Complexity:
Is Regression:
Sprint Focus:

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.

No data to display

Actions

Also available in: Atom PDF