Skip to content

Commit

Permalink
file cache concurrency fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gureedo committed Jul 9, 2014
1 parent b74f2bb commit 3955c07
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -104,7 +104,7 @@ protected function createOrReturnCacheDirectory($key)
{
$path = $this->getCacheDir() . '/' . substr($key, 0, 2);
if (false === file_exists($path)) {
mkdir($path, 0775, true);
@mkdir($path, 0775, true);
}
return $path;
}
Expand All @@ -118,7 +118,7 @@ protected function createOrReturnCacheDirectory($key)
protected function ensureExists($cacheDir)
{
if (false === file_exists($cacheDir)) {
mkdir($cacheDir, 0775, true);
@mkdir($cacheDir, 0775, true);
}
return $cacheDir;
}
Expand Down Expand Up @@ -155,7 +155,7 @@ protected function readVersion()
*/
protected function writeVersion()
{
file_put_contents($this->getVersionFile(), self::VERSION);
file_put_contents($this->getVersionFile(), self::VERSION, LOCK_EX);
}

/**
Expand Down

0 comments on commit 3955c07

Please sign in to comment.