0
0
Redisquery~10 mins

Why Redis for in-memory data storage - 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'
Amykey
BGET
CEXPIRE
DDEL
Attempts:
3 left
💡 Hint
Common Mistakes
Using Redis commands like GET or DEL as keys.
Leaving the key blank.
2fill in blank
medium

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

Redis
[1] mykey
Drag options to blanks, or click blank then click option'
ADEL
BSET
CGET
DEXPIRE
Attempts:
3 left
💡 Hint
Common Mistakes
Using SET instead of GET to retrieve data.
Using DEL which deletes keys.
3fill in blank
hard

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

Redis
DEL [1]
Drag options to blanks, or click blank then click option'
Amykey
BGET
CSET
DEXPIRE
Attempts:
3 left
💡 Hint
Common Mistakes
Using commands like GET or SET as arguments to DEL.
Not specifying the key to delete.
4fill in blank
hard

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

Redis
SET [1] "value" [2] 60
Drag options to blanks, or click blank then click option'
Amykey
BEX
CPX
DNX
Attempts:
3 left
💡 Hint
Common Mistakes
Using PX which sets expiration in milliseconds instead of seconds.
Omitting the expiration option.
5fill in blank
hard

Fill the blanks to increment a numeric key by 5.

Redis
[1] [2] 5
Drag options to blanks, or click blank then click option'
AINCRBY
Bmycounter
CXX
DNX
Attempts:
3 left
💡 Hint
Common Mistakes
Using options like XX or NX, which apply to SET not INCRBY.
Using wrong command instead of INCRBY.