QuestionQ15

Connect to and consume Azure services

You are building an AI search API that stores semantic-search results in Redis.

Search results must stay cached for 10 minutes. If the underlying data is modified, cached entries must not be returned.

You need to implement a cache-aside strategy that maintains data consistency.

Which two actions should you take? Each correct answer represents part of the solution.

NOTE: Each correct selection is worth one point.

Choose two
  • A Configure a cache notification for key space events.
  • B Delete related cache keys when the source data changes.
  • C Implement sliding expiration based on key access.
  • D Configure a 10-minute Time to Live on each key.
Explanation

Cache-aside stores entries with a TTL to bound their lifetime and explicitly invalidates affected cache keys when the source data is updated. A 10-minute TTL satisfies the required cache duration, and deleting related keys on a data change forces the next read to retrieve and cache current data rather than returning a stale value. Redis documents cache-aside as using a per-key TTL together with deletion on write for explicit invalidation.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!