$redis = new Redis();
$pipe = $redis->multi(Redis::PIPELINE);
while(true){
//code...
$pipe->sAdd($key, $value);
}
try{
$pipe->exec();
}catch (Exception $e){
$pipe->discard();
}
$redis = new Redis();
$pipe = $redis->multi(Redis::PIPELINE);
while(true){
//code...
$pipe->sAdd($key, $value);
}
try{
$pipe->exec();
}catch (Exception $e){
$pipe->discard();
}
本文标题:Redis批量快速导入
本文链接:https://www.haomeiwen.com/subject/mywwtxtx.html
网友评论