0
0
Redisquery~10 mins

OBJECT ENCODING for internal encoding in Redis - Interactive Code Practice

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

Complete the code to check the internal encoding of a Redis key.

Redis
OBJECT ENCODING [1]
Drag options to blanks, or click blank then click option'
AGET
Bmykey
CTYPE
DENCODING
Attempts:
3 left
💡 Hint
Common Mistakes
Using the keyword 'ENCODING' after 'OBJECT ENCODING' instead of the key name.
Using 'GET' or 'TYPE' which are different Redis commands.
2fill in blank
medium

Complete the command to get the internal encoding of the key named 'user:1000'.

Redis
OBJECT ENCODING [1]
Drag options to blanks, or click blank then click option'
Auser:1000
BENCODING
CTYPE
DGET
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ENCODING' or 'TYPE' instead of the key name.
Confusing this with other Redis commands like GET.
3fill in blank
hard

Fix the error in the command to get the encoding of the key 'session123'.

Redis
OBJECT [1] session123
Drag options to blanks, or click blank then click option'
ATYPE
BGET
CENCODING
DSIZE
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'GET' or 'TYPE' which are different commands.
Using 'SIZE' which is not a valid OBJECT subcommand.
4fill in blank
hard

Fill both blanks to complete the command that shows the encoding of the key 'cache:data'.

Redis
[1] [2] cache:data
Drag options to blanks, or click blank then click option'
AOBJECT
BENCODING
CGET
DTYPE
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the order of 'OBJECT' and 'ENCODING'.
Using 'GET' or 'TYPE' instead of 'ENCODING'.
5fill in blank
hard

Fill all three blanks to create a command that checks the encoding of the key 'temp:42' and returns its type.

Redis
[1] [2] temp:42 && [3] temp:42
Drag options to blanks, or click blank then click option'
AOBJECT
BENCODING
CTYPE
DGET
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'GET' instead of 'TYPE' for the data type.
Mixing the order of commands.