Adding a file_exists() check before unlinking cache files.

This prevents issues where two concurrent requests could
be clearing the same cache files.
Fixes #1936
This commit is contained in:
mark_story 2011-08-27 11:52:29 -04:00
parent 1a872e6544
commit 4a7bd031e5

View file

@ -240,8 +240,10 @@ class FileEngine extends CacheEngine {
}
$path = $this->_File->getRealPath();
$this->_File = null;
if (file_exists($path)) {
unlink($path);
}
}
$dir->close();
return true;
}