正文  软件开发 > PHP编程技术 >

readis操作,

readis操作,1. 删除readis $Ranking = $this->Redis->_delete(‘lianmengname‘); 2. 读取readis缓存 $Ranking...

readis操作,

1. 删除readis

 $Ranking = $this->Redis->_delete(‘lianmengname‘);

2. 读取readis缓存

 $Ranking = $this->Redis->_get(‘lianmengname‘);

3. 存readis

if(empty($Ranking)){
      $Ranking = $this->DoubleAct->selectRanking();
      $this->Redis->_set(‘lianmengname‘,json_encode($Ranking),1800);//缓存半小时
    }

http://www.bkjia.com/PHPjc/1224829.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1224829.htmlTechArticlereadis操作, 1. 删除readis $Ranking = $this-Redis-_delete(‘lianmengname‘); 2. 读取readis缓存 $Ranking = $this-Redis-_get(‘lianmengname‘); 3. 存readis if(empty($Ranking)){...