private function setContent($name, $content)
    {
        $filename = $this->getCacheFileName($name);

        if ($this->options['thread_safe']) {
            $fd = fopen($filename, 'w+');
            flock($fd, LOCK_EX);
            $fr = fwrite($fd, $content);
            fclose($fd);

            return $fr;
        } else {
            return file_put_contents($filename, $content);
        }
    }
private function setContent($name, $content)
    {
        $filename = $this->getCacheFileName($name);

        if ($this->options['thread_safe']) {
            $fd = fopen($filename, 'w+');
            flock($fd, LOCK_EX);
            $fr = fwrite($fd, $content);
            fclose($fd);

            return $fr;
        } else {
            return file_put_contents($filename, $content);
        }
    }
private function setContent ( $ name , $ content ) { $ filename = $ this -> getCacheFileName ( $ name ) ; if ( $ this -> options [ 'thread_safe' ] ) { $ fd = fopen ( $ filename , 'w+' ) ; flock ( $ fd , LOCK_EX ) ; $ fr = fwrite ( $ fd , $ content ) ; fclose ( $ fd ) ; return $ fr ; } else { return file_put_contents ( $ filename , $ content ) ; } }
Write content into a file.
@param $name
@param $content
@author : evalor <master@evalor.cn>
@return bool|int
Write content into a file .