AI-200 practice question 4 of 10
You optimize an Al inference API that uses Redis caching. You must reduce the risk of serving outdated data while minimizing cache management overhead. You need to implement the caching strategy that satisfies the requirements. What should you do?
Full set: 67 questionsTo ensure data consistency and prevent serving outdated data, the most effective caching strategy is to trigger cache invalidation when the underlying source data changes. This proactive approach guarantees that the AI inference API will fetch the latest data on the next request, minimizing the risk of stale data while avoiding the overhead of excessively short expiration times or complex synchronization mechanisms.
A. Resetting expiration on read (sliding expiration) prolongs the life of potentially stale data if it is frequently accessed.
B. Disabling expiration ensures data remains in the cache indefinitely, leading to highly outdated data being served.
C. The allkeys-lru eviction policy manages memory by removing least recently used keys; it does not ensure data freshness.
Microsoft Learn: Caching guidance - Azure Architecture Center. Section: "Managing data consistency" and "Cache invalidation". Document ID: azure/architecture/best-practices/caching.
Keep practicing
Take the free AI-200 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other AI-200 practice questions
- Question 1You are developing an AI application that processes customer embeddings stored in Azure C…
- Question 2You are developing an Al-powered API that retrieves connection strings and API keys from …
- Question 3Your team is building an AI model serving application using Azure Cosmos DB for NoSQL as …
