HINCRBY key field increment

    Time complexity: O(1)

    Increments the number stored at in the hash stored at key by . If key does not exist, a new key holding a hash is created. If does not exist the value is set to 0 before the operation is performed.

    Integer reply: the value at after the increment operation.

    *Examples

    Since the increment argument is signed, both increment and decrement operations can be performed:

    redis> HINCRBY myhash field 1

    redis> HINCRBY myhash field -1

    redis>