DECRBY key decrement
DECRBY 用于将 key 所存储的值减去减量 decrement,也就是指定数值。127.0.0.1:6379> SET count 100 OK 127.0.0.1:6379> DECRBY count 20 (integer) 80
127.0.0.1:6379> GET count "80" 127.0.0.1:6379> INCRBY count -20 (integer) 60 127.0.0.1:6379> GET count "60"
127.0.0.1:6379> EXISTS pages (integer) 0 127.0.0.1:6379> DECRBY pages 10 (integer) -10
本文链接:http://task.lmcjl.com/news/16518.html