public static function savesetredis($key,$data)
{
//保存1天
$result=array();
if (Yii::$app->redis->setex($key, 24*60*60, json_encode($data))) {
$result=json_decode(Yii::$app->redis->get($key), true);
}
return $result;
}
Yii2使用redis的set方法详解
猜你喜欢
转载自blog.csdn.net/guo_qiangqiang/article/details/88852138
今日推荐
周排行