Complete the code to start a Redis transaction using MULTI.
[1]The MULTI command starts a transaction block in Redis.
Complete the code to queue a command inside a Redis transaction after starting MULTI.
MULTI
SET mykey [1]Inside a transaction, commands like SET are queued with their arguments, here the value myvalue.
Fix the error in the code to properly execute the queued commands in a Redis transaction.
MULTI
SET key1 value1
[1]The EXEC command runs all queued commands in the transaction.
Fill both blanks to start a transaction and watch a key for changes before queuing commands.
[1] mykey [2]
WATCH monitors keys for changes, then MULTI starts the transaction.
Fill all three blanks to watch a key, start a transaction, and discard it if needed.
[1] mykey [2] [3]
First WATCH the key, then MULTI to start the transaction, and DISCARD to cancel it if needed.