Efficient way redis set member update

天大地大妈咪最大 提交于 2019-11-29 16:42:21

Set members themselves are immutable - you can add new members or remove existing ones. That's it.

Given that a set is an unordered collection of unique members, consider the possible outcomes were set members theoretically modifiable when the new value for a member:

  1. is identical to the old value - no change to the set
  2. already exists in the set - equivalent to deleting that member
  3. isn't 1 or 2 - equivalent to deleting the member and adding a new one
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!