Complete the code to get the values of multiple keys in a Redis cluster.
MGET [1]The MGET command requires each key as a separate argument, so you must provide each key as a separate string.
Complete the code to set multiple keys with their values atomically using a Redis cluster.
MSET [1]The MSET command requires pairs of keys and values as separate arguments, each as a string.
Fix the error in the command to delete multiple keys in a Redis cluster.
DEL [1]The DEL command requires each key as a separate argument, so you must provide each key separately in quotes.
Fill both blanks to correctly perform a multi-key atomic increment operation in Redis cluster using Lua script.
EVAL "return redis.call('INCRBY', [1], [2])" 0
The Lua script calls INCRBY on the key 'key1' with increment 5. Both must be strings or numbers as required.
Fill all three blanks to create a Redis Lua script that atomically sets a key only if it does not exist and returns the new value.
EVAL "if redis.call('SETNX', [1], [2]) == 1 then return redis.call('GET', [3]) else return nil end" 0
The script sets 'mykey' to '100' if it does not exist, then returns the value of 'mykey'. The same key must be used consistently.