mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-13 19:46:53 +01:00
Fixed a bug that CFileCache may slow down performance when strlen is overloaded by mb_strlen
This commit is contained in:
@@ -134,7 +134,7 @@ class CFileCache extends CCache
|
||||
$cacheFile=$this->getCacheFile($key);
|
||||
if($this->directoryLevel>0)
|
||||
@mkdir(dirname($cacheFile),0777,true);
|
||||
if(@file_put_contents($cacheFile,$value,LOCK_EX)==strlen($value))
|
||||
if(@file_put_contents($cacheFile,$value,LOCK_EX)!==false)
|
||||
{
|
||||
@chmod($cacheFile,0777);
|
||||
return @touch($cacheFile,$expire);
|
||||
|
||||
Reference in New Issue
Block a user