Project

General

Profile

Actions

Bug #67238

closed

Avoid race conditions in typo3temp/Cache

Added by Bernhard Kraft almost 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
Start date:
2015-06-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Race conditions can occur when the cache in typo3temp/Cache gets cleared, for example by using the Install Tool "Clear all caches" button. The cache is currently cleared using GeneralUtility::rmdir() which does a directory traversal and unlinks all contained files. Instead GeneralUtility::flushDirectory() should get used. This method renames the directory into a temp-dir name and then removes the temp-dir using GeneralUtility:rmdir(). But as the rename is atomic there will be no race condition where files within typo3temp/Cache/ will get recreated while the cache-clearing process is still running.

Actions

Also available in: Atom PDF