DECR
Syntax
Section titled “Syntax”DECR key
DECR command decrements the integer at ‘key’ by one. Creates ‘key’ as -1 if absent. The command raises an error if the value is a non-integer.
Returns the new value of ‘key’ on success.
Examples
Section titled “Examples”localhost:7379> SET k 43OKlocalhost:7379> DECR kOK 42localhost:7379> DECR k1OK -1localhost:7379> SET k2 vOKlocalhost:7379> DECR k2ERR wrongtype operation against a key holding the wrong kind of value