Redis HSETNX Command

In Redis, the HSETNX command enables us to set a field in a hash, but only if the field doesn’t already exist. It sets the field at the specified key to the value we provide.

If the key doesn’t exist, it’s created with the specified hash value. If the field already exists, nothing is set (i.e. the command has no effect).

Read more

Redis HSET Command

In Redis, the HSET command enables us to set one or more fields in a hash. It sets the field/s at the specified key to the value/s we provide.

If the key doesn’t exist, it’s created with the specified hash value. If the field already exists, it is overwritten with the new value.

Read more

Redis SUNIONSTORE Command Explained

In Redis, the SUNIONSTORE command does the same thing that SUNION does, except that it stores the result in a key. More specifically, it takes the members of the set resulting from the union of all of the given sets, and stores them in the specified key.

Read more

Redis SPOP Command Explained

In Redis, the SPOP command removes and returns one or more random members from the set value store at the specified key.

This command is similar to the SRANDMEMBER command in that it returns one or more random members from a set, but SPOP removes it, whereas SRANDMEMBER doesn’t.

Read more

Redis SMISMEMBER Command Explained

In Redis, we can use the SMISMEMBER command to find out whether one or more members are in a given set. It’s similar to the SISMEMBER command, except that it allows us to check more than one member at a time.

The SMISMEMBER command was introduced in Redis 6.2.0.

Read more