0
0
Redisquery~10 mins

PERSIST to remove expiry 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 remove the expiration from the key 'session'.

Redis
PERSIST [1]
Drag options to blanks, or click blank then click option'
Atimeout
Bexpire
Csession
Dkey
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'expire' or 'timeout' instead of the actual key name.
Forgetting to specify the key name.
2fill in blank
medium

Complete the code to check if the expiration was removed from the key 'user123'.

Redis
TTL [1]
Drag options to blanks, or click blank then click option'
Aexpire
Btimeout
Csession
Duser123
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'expire' or 'timeout' instead of the key name.
Confusing the command with PERSIST.
3fill in blank
hard

Fix the error in the command to remove expiry from the key 'cache'.

Redis
PERSIST [1]
Drag options to blanks, or click blank then click option'
Aexpire
Bcache
Ccache_key
Dtimeout
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong key name like 'cache_key' instead of 'cache'.
Using command names as key names.
4fill in blank
hard

Fill both blanks to remove expiry from 'token' and check its TTL.

Redis
PERSIST [1]
TTL [2]
Drag options to blanks, or click blank then click option'
Atoken
Bsession
Dcache
Attempts:
3 left
💡 Hint
Common Mistakes
Using different key names in the two commands.
Using wrong key names like 'session' or 'cache'.
5fill in blank
hard

Fill all three blanks to remove expiry from 'auth', check TTL, and set expiry to 60 seconds if TTL is -1.

Redis
PERSIST [1]
TTL [2]
EXPIRE [3] 60
Drag options to blanks, or click blank then click option'
Aauth
Dsession
Attempts:
3 left
💡 Hint
Common Mistakes
Using different key names in commands.
Confusing PERSIST and EXPIRE commands.