In Redis, the ZADD
command is used to add one or more members to a sorted set, or to update the score for members that already exist in the sorted set.
It returns the number of elements added to the sorted set, or the number of elements updated if the CH
argument is used.