yangzailu

导航

redis操作

1. 删除redis

ps -ef |grep redis

 

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

2. 读取readis缓存

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

3. 存redis

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

 4.查看redis进程是否存在

ps -ef |grep redis

 

posted on 2017-09-05 11:54  飞离地平线  阅读(463)  评论(2编辑  收藏  举报