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);//缓存半小时 }
Atas ialah kandungan terperinci redis操作有哪几种. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!