Skip to content
Permalink
Browse files

Ignore RuntimeException

RuntimeException is thrown at race condition.
However, since for the processing at Garbage Collection, other processes
is determined that the expired.
this process is acceptable to ignore the RuntimeException even if there is
missing file.
  • Loading branch information...
mtak3 committed Aug 19, 2014
1 parent b5688f0 commit 6b957646192bf72a5f319c9eea723929095ed9ec
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Cake/Cache/Engine/FileEngine.php
@@ -275,7 +275,11 @@ protected function _clearDirectory($path, $now, $threshold) {
if (!file_exists($filePath) || is_dir($filePath)) {
continue;
}
$file = new SplFileObject($path . $entry, 'r');
try {
$file = new SplFileObject($path . $entry, 'r');
} catch (RuntimeException $e) {
continue;
}
if ($threshold) {
$mtime = $file->getMTime();

0 comments on commit 6b95764

Please sign in to comment.
You can’t perform that action at this time.