Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 6b95764
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Cake/Cache/Engine/FileEngine.php
Expand Up @@ -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();
Expand Down

0 comments on commit 6b95764

Please sign in to comment.