This helper function checks if a certain key exists and only if that's the case, it decrements the value of the key. This is in contrast to the normal Redis DECR command which creates a new key, if it notices that the key does not exist and sets the value of the key to 0 by default.
This helper function checks if a certain key exists and only if that's the case, it decrements the value of the key. This is in contrast to the normal Redis DECR command which creates a new key, if it notices that the key does not exist and sets the value of the key to
0
by default.