Redis ZINCRBY 命令按增量递增存储在键(key)中的排序集中元素的分数。
ZINCRBY - 返回值
返回元素的新分数(双精度浮点数),表示为字符串。
ZINCRBY - 语法
以下是Redis ZINCRBY 命令的基本语法。
redis 127.0.0.1:6379> ZINCRBY KEY INCREMENT MEMBER
ZINCRBY - 示例
redis 127.0.0.1:6379> ZADD myset 1 "hello" (integer) 1 redis 127.0.0.1:6379> ZADD myset 1 "foo" (integer) 1 redis 127.0.0.1:6379> ZINCRBY myzset 2 "hello" (integer) 3 redis 127.0.0.1:6379> ZRANGE myzset 0 -1 WITHSCORES 1) "foo" 2) "2" 3) "hello" 4) "3"
参考链接
https://www.learnfk.com/redis/sorted-sets-zincrby.html
标签:127.0,0.1,Redis,redis,无涯,6379,ZINCRBY From: https://blog.51cto.com/u_14033984/9156363