[BUGFIX] Mitigate race condition on cache flush 94/28594/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Fri, 21 Mar 2014 10:05:09 +0000 (11:05 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 21 Mar 2014 15:22:44 +0000 (16:22 +0100)
commite7eae9053bc96931946ef4f578c0c6f5df28db41
treeebcc24dfb5371a2ea2b1bb2ef059f3cf5bd34117
parentc23414d5a73b4892fa53650c50564251d6d03d07
[BUGFIX] Mitigate race condition on cache flush

When file caches are flushed, the cache directory
is also deleted.

Now when a second request comes in and creates
the caches it happens that the cache directory of
a given cache is still there for this cache when
calling setCache in the SimpleFileBackend,
but is deleted by the first request afterwards.

Now the cache directory for the second request
does not exist and setting cache entries will fail.

Mitigate this by immediately recreating
the cache directory.

Resolves: #57136
Releases: 6.2
Change-Id: I3c4c5c63c6c754447549285d9718798272f9e585
Reviewed-on: https://review.typo3.org/28594
Reviewed-by: Ernesto Baschny
Reviewed-by: Thomas Maroschik
Reviewed-by: Pascal Dürsteler
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php