Redis.decr

Decrement the number stored at key by one. If the key does not exist or contains a value of a wrong type, set the key to the value of "0" before to perform the decrement operation. <p> INCR commands are limited to 64 bit signed integers. <p> Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64 bit signed integer, incremented, and then converted back as a string. <p> Time complexity: O(1) @see #incr(string) @see #incrBy(string, long) @see #decrBy(string, long) @param key @return Integer reply, this commands will reply with the new value of key after the increment.

  1. Long decr(string key)
    class Redis
    Long
    decr
    (
    string key
    )
  2. alias decr = BinaryRedis.decr

Meta