Redis ZPOPMIN Command Explained

In Redis, the ZMPOPMIN command removes and returns (pops) members with the lowest scores from the specified sorted set. By default it pops one member, but we can also specify how many members we want to pop.

Read more

Redis BZMPOP Command Explained

In Redis, the BZMPOP command is the blocking variant of the ZMPOP command.

The BZMPOP command works exactly like ZMPOP when any of the sorted sets contain elements. It also works exactly like ZMPOP when used inside a MULTI/EXEC block. That is, it pops one or more elements from the first non-empty sorted set in the provided list of keys.

However, if all of the specified sorted sets are empty, then BZMPOP will block the connection until another client adds members to one of the keys or until the specified timeout elapses. It’s possible to block the connection indefinitely by using a timeout of zero.

Read more

Redis ZINTERSTORE Command Explained

In Redis, the ZINTERSTORE command computes the intersection of the specified sorted sets and stores the result in the specified key. It works the same as the ZINTER command, except that it stores the result instead of returning it.

If the destination key already exists, it’s overwritten.

Read more

Redis ZDIFFSTORE Command Explained

In Redis, the ZDIFFSTORE command computes the difference between the first and all successive input sorted sets and stores the result in the specified key.

ZDIFFSTORE works in the same way as the ZDIFF command, except that it stores the result instead of returning it (ZDIFF returns the result instead of storing it in a new key).

Read more