nerdexam
MicrosoftMicrosoft

AZ-204 · Question #312

AZ-204 Question #312: Real Exam Question with Answer & Explanation

The correct answer is B: allkeys-lru. B: The allkeys-lru policy evict keys by trying to remove the less recently used (LRU) keys first, in order to make space for the new data added. Use the allkeys-lru policy when you expect a power- law distribution in the popularity of your requests, that is, you expect that a sub

Submitted by brentm· Mar 30, 2026

Question

You are developing a web application that uses Azure Cache for Redis. You anticipate that the cache will frequently fill and that you will need to evict keys. You must configure Azure Cache for Redis based on the following predicted usage pattern: A small subset of elements will be accessed much more often than the rest. You need to configure the Azure Cache for Redis to optimize performance for the predicted usage pattern. Which two eviction policies will achieve the goal? NOTE: Each correct selection is worth one point.

Options

  • Anoeviction
  • Ballkeys-lru
  • Cvolatile-lru
  • Dallkeys-random
  • Evolatile-ttl
  • Fvolatile-random

Explanation

B: The allkeys-lru policy evict keys by trying to remove the less recently used (LRU) keys first, in order to make space for the new data added. Use the allkeys-lru policy when you expect a power- law distribution in the popularity of your requests, that is, you expect that a subset of elements will be accessed far more often than the rest. C: volatile-lru: evict keys by trying to remove the less recently used (LRU) keys first, but only among keys that have an expire set, in order to make space for the new data added. Note: The allkeys-lru policy is more memory efficient since there is no need to set an expire for the key to be evicted under memory pressure. https://redis.io/topics/lru-cache

Community Discussion

No community discussion yet for this question.

Full AZ-204 PracticeBrowse All AZ-204 Questions