Bug #91768 ยป typo3-cms-core-simple-file-backend-resilience.patch
Classes/Cache/Backend/SimpleFileBackend.php 2020-11-03 09:28:30.766220211 +0100 | ||
---|---|---|
$result = file_put_contents($temporaryCacheEntryPathAndFilename, $data);
|
||
GeneralUtility::fixPermissions($temporaryCacheEntryPathAndFilename);
|
||
if ($result === false) {
|
||
throw new Exception('The temporary cache file "' . $temporaryCacheEntryPathAndFilename . '" could not be written.', 1334756737);
|
||
$this->logger->warning('The temporary cache file "' . $temporaryCacheEntryPathAndFilename . '" could not be written.');
|
||
return;
|
||
}
|
||
$cacheEntryPathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
|
||
rename($temporaryCacheEntryPathAndFilename, $cacheEntryPathAndFilename);
|
||
$result = rename($temporaryCacheEntryPathAndFilename, $cacheEntryPathAndFilename);
|
||
if ($result === false) {
|
||
$this->logger->warning('The cache file "' . $cacheEntryPathAndFilename . '" could not be written.');
|
||
return;
|
||
}
|
||
if ($this->cacheEntryFileExtension === '.php') {
|
||
GeneralUtility::makeInstance(OpcodeCacheService::class)->clearAllActive($cacheEntryPathAndFilename);
|
||
}
|