Bug #32709 ยป 32707_filebackend-not-atomar.diff
t3lib/cache/backend/class.t3lib_cache_backend_filebackend.php (working copy) | ||
---|---|---|
);
|
||
}
|
||
$this->remove($entryIdentifier);
|
||
$temporaryCacheEntryPathAndFilename = $this->cacheDirectory . uniqid() . '.temp';
|
||
if (strlen($temporaryCacheEntryPathAndFilename) > t3lib_div::getMaximumPathLength()) {
|
||
throw new t3lib_cache_Exception(
|
||
... | ... | |
$i = 0;
|
||
$cacheEntryPathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
|
||
// @TODO: Figure out why the heck this is done and maybe find a smarter solution, report to FLOW3
|
||
while (!rename($temporaryCacheEntryPathAndFilename, $cacheEntryPathAndFilename) && $i < 5) {
|
||
while ( ($renameResult = rename($temporaryCacheEntryPathAndFilename, $cacheEntryPathAndFilename)) == false && $i < 5) {
|
||
$i++;
|
||
}
|
||
// @FIXME: At least the result of rename() should be handled here, report to FLOW3
|
||
if ($result === FALSE) {
|
||
if ($renameResult === FALSE) {
|
||
throw new t3lib_cache_exception(
|
||
'The cache file "' . $cacheEntryPathAndFilename . '" could not be written.',
|
||
'The cache file "' . $cacheEntryPathAndFilename . '" could not be renamed/written.',
|
||
1222361632
|
||
);
|
||
}
|
||
... | ... | |
return ($this->isCacheFileExpired($pathAndFilename)) ? FALSE : require_once($pathAndFilename);
|
||
}
|
||
}
|
||
?>
|
||
?>
|