0
0
Redisquery~20 mins

Redis as cache vs data store vs message broker - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Redis Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Primary use of Redis as a cache
What is the main reason Redis is used as a cache in applications?
ATo store data permanently with complex queries
BTo perform heavy data analytics and reporting
CTo send messages between different parts of an application
DTo temporarily store frequently accessed data for faster retrieval
Attempts:
2 left
💡 Hint
Think about why caching helps speed up applications.
🧠 Conceptual
intermediate
2:00remaining
Redis as a message broker role
Which Redis feature allows it to act as a message broker?
AKey expiration for automatic data deletion
BPub/Sub system for sending messages between clients
CSorted sets for ranking data
DHashes for storing user profiles
Attempts:
2 left
💡 Hint
Message brokers help parts of an app talk to each other.
query_result
advanced
2:00remaining
Result of Redis command for cache expiration
What is the output of the following Redis commands?

SET user:1 "Alice" EX 10
TTL user:1
Redis
SET user:1 "Alice" EX 10
TTL user:1
A0
B-1
C10
Dnil
Attempts:
2 left
💡 Hint
EX sets expiration in seconds; TTL returns remaining time.
📝 Syntax
advanced
2:00remaining
Correct Redis command to publish a message
Which Redis command correctly publishes the message "Hello" to the channel "news"?
APUBLISH news Hello
BPUBLISH news "Hello"
CPUBLISH "news" "Hello"
DPUBLISH "news" Hello
Attempts:
2 left
💡 Hint
Redis commands do not require quotes for simple strings.
🧠 Conceptual
expert
3:00remaining
Choosing Redis as data store vs cache
Which scenario best justifies using Redis as a primary data store instead of just a cache?
AMaintaining real-time leaderboard data that must be highly available
BCaching product details that are also stored in a relational database
CHolding temporary API rate limit counters that reset often
DStoring session data that can be lost without issues
Attempts:
2 left
💡 Hint
Think about when data loss is unacceptable and fast access is critical.