$data = [
'zoneList'=>$zoneList,
'eqList' => $eqList,
'mdateList' => $mdateList
];
Redis::setex($cacheKey, , serialize($data));
使用setex命令一条命令就可以完成,不建议用set和expire命令,两条命令效率低于一条命令
$data = [
'zoneList'=>$zoneList,
'eqList' => $eqList,
'mdateList' => $mdateList
];
Redis::setex($cacheKey, , serialize($data));
使用setex命令一条命令就可以完成,不建议用set和expire命令,两条命令效率低于一条命令