Commit c5b42910 by Carsten Brandt

Merge branch 'master' of github.com:yiisoft/yii2

* 'master' of github.com:yiisoft/yii2: refactored code.
parents bdb77f33 172d9295
......@@ -71,11 +71,7 @@ class FileCache extends Cache
public function exists($key)
{
$cacheFile = $this->getCacheFile($this->buildKey($key));
if (($time = @filemtime($cacheFile)) > time()) {
return true;
} else {
return false;
}
return @filemtime($cacheFile) > time();
}
/**
......@@ -87,7 +83,7 @@ class FileCache extends Cache
protected function getValue($key)
{
$cacheFile = $this->getCacheFile($key);
if (($time = @filemtime($cacheFile)) > time()) {
if (@filemtime($cacheFile) > time()) {
return @file_get_contents($cacheFile);
} else {
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment