0
0
Redisquery~10 mins

Why patterns guide Redis usage - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set a key-value pair in Redis.

Redis
SET [1] "Hello"
Drag options to blanks, or click blank then click option'
ADEL
BGET
Cgreeting
DEXPIRE
Attempts:
3 left
💡 Hint
Common Mistakes
Using a command like GET instead of a key name.
Leaving the key blank.
2fill in blank
medium

Complete the code to retrieve the value of a key in Redis.

Redis
GET [1]
Drag options to blanks, or click blank then click option'
Agreeting
BDEL
Cvalue
DSET
Attempts:
3 left
💡 Hint
Common Mistakes
Using a command name instead of a key.
Using a different key name than the one stored.
3fill in blank
hard

Fix the error in the code to delete a key in Redis.

Redis
DEL [1]
Drag options to blanks, or click blank then click option'
AGET
BEXPIRE
CSET
Dgreeting
Attempts:
3 left
💡 Hint
Common Mistakes
Using a command name instead of a key.
Trying to delete a key that does not exist.
4fill in blank
hard

Fill both blanks to set a key with an expiration time in seconds.

Redis
SET [1] "SessionData" [2] 300
Drag options to blanks, or click blank then click option'
Asession_key
BEX
CPX
DDEL
Attempts:
3 left
💡 Hint
Common Mistakes
Using PX instead of EX for seconds.
Using a command name instead of a key.
5fill in blank
hard

Fill all three blanks to add a member with a score to a sorted set in Redis.

Redis
ZADD [1] [2] [3]
Drag options to blanks, or click blank then click option'
Aleaderboard
B1500
Cplayer1
Dsession
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the order of score and member.
Using a wrong key name or command instead of the set name.