You cache player positions in Azure Cache for Redis and prioritize players based on how recently they moved; players who log out must not be prioritized. Which eviction policy should you select?
Choose an answer
Tap an option to check your answer.
Correct answer: volatile-lru.
Why this is the answer
The volatile-lru (Least Recently Used) eviction policy is correct because it removes keys with an expire set, prioritizing those that haven't been accessed recently. This aligns with the requirement to prioritize players based on recent movement (meaning active players are accessed) and to remove logged-out players (who would have an expire set and no recent access). allkeys-lru would evict any key, regardless of whether it has an expire set, which is not ideal for distinguishing between active and logged-out players. allkeys-lfu (Least Frequently Used) evicts keys based on frequency of access, not recency, and also applies to all keys, which doesn't fit the "logged out" criteria. volatile-ttl evicts keys with the shortest remaining time to live (TTL), which doesn't directly address the "recently moved" or "logged out" requirements as effectively as LRU.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed