set() public method

写入缓存
public set ( string $name, mixed $value, integer $expire = null ) : boolean
$name string 缓存变量名
$value mixed 存储数据
$expire integer 有效时间(秒)
return boolean
 public function test()
 {
     $redis = new Redis();
     // $redis->connect('127.0.0.1',6379);
     $redis->set('test', 'hello world!');
     echo $redis->get("test");
 }