Redis Command: SADD

Add one or more items/members to a set. Multiple member elements are supported in the command. So we can add one or more members to the same set at the same time. If the key does not exist, then it is created and then members are added to it. If the item/member element already exists in the set, then it is ignored.

Redis Command: HINCRBY

Increment the integer value of a hash field. This command increments the field value by a certain amount that is provided. If the hash does not exist, or the field does not exist, then the hash and/or the field will be created. So we will never get any error related to non-existing hash key or field. The field’s max and min allowed value is of a 64-bit signed integer.

Redis Command: HGET

Get the value of a single field of a hash. This is the simplest command for getting the value from a hash, but only one field can be fetched from the hash. HMGET supports multiple fields, and HGETALL returns all data of a hash. So you can use these if these commands serve your purpose.