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方法详解
最新推荐文章于 2024-03-09 11:55:02 发布