1. 刪除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);//缓存半小时 }
以上是redis操作有哪幾種的詳細內容。更多資訊請關注PHP中文網其他相關文章!