You plan to use Azure Cache for Redis and expect the cache to frequently reach capacity and require evictions. Access patterns show a small subset of items will be accessed far more often than others. Which two eviction policies should you choose to optimize performance for this pattern?
Choose an answer
Tap an option to check your answer.
Correct answer: allkeys-lru, volatile-lru.
Why this is the answer
For a cache that frequently reaches capacity and has a small subset of frequently accessed items, Least Recently Used (LRU) policies are optimal. allkeys-lru evicts the least recently used keys from all keys in the cache. This is effective when the most frequently accessed items are a small portion of the total, ensuring they remain in cache. volatile-lru evicts the least recently used keys from only those keys that have an expire set. This is useful if you want to prioritize eviction of keys that are explicitly marked as volatile, while still keeping frequently accessed items. noeviction would cause write operations to return errors when the cache is full, which is not desired. allkeys-random and volatile-random evict keys randomly, which is inefficient for patterns with hot data. volatile-ttl evicts keys with the shortest time-to-live, which doesn't prioritize frequently accessed items.
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