Method Signature
Parameters
The key of the sorted set
The amount to increment the score by. Can be negative to decrement the score.
The member whose score should be incremented. If the member does not exist, it is added to the sorted set with the increment as its score.
Response
The new score of the member after the increment operation
Examples
Increment a member’s score
Decrement a member’s score
Add new member with increment
Track points over time
Award bonus points
Implement daily streaks
Track negative metrics
Atomic counter with ranking
Implement voting system
Calculate running averages
- ZADD - Add or update members in a sorted set
- ZSCORE - Get the score of a member
- ZRANK - Get the rank of a member
- ZRANGE - Return a range of members