Redis:如何在多个有序集中添加记录

时间:2017-01-30 12:50:41

标签: node.js redis sortedset

我将用户的关注者列表存储为每个用户的单独排序集。

enter image description here

对于每个用户,我创建了单独的排序集来存储他们的帖子:

enter image description here

当用户1添加新帖子时,我想立即将其从 user1-followers 添加到其各自的$ userid $ -postfeeds排序集中。

目前,我已经使用管道(使用NODEJS)进行多个ZADD命令。是否有更好的方法来扇出写入以同时在多个有序集合中插入记录。

0 个答案:

没有答案