AZ-700 Question 221
Single answerYou manage a global e-commerce platform that hosts static product images in Azure Blob Storage behind an Azure CDN. The marketing team updates these images frequently. You want to retain a 30-day cached time-to-live (TTL) for performance, yet ensure content changes appear promptly without requiring frequent manual purges. Which approach should you take to meet both requirements?
- A
Apply a 30-day TTL using 'Set if missing' with no additional versioning or rules
- B
Use an 'Ignore query strings' caching optimization to treat all requests identically
- C
Adopt a versioning strategy for file names or query strings to differentiate new content
- D
Disable any long-term caching at the CDN level to force immediate updates
Show answer and explanation
Correct answer: C
Explanation
For static content that changes frequently, using a versioning scheme (such as incrementing file names or query parameters) helps the CDN differentiate newer files from cached ones. This avoids manual purges while maintaining a long TTL for better performance. Microsoft� documentation recommends these techniques to balance performance and fresh content (e.g., see Azure CDN best practices).
- A. Incorrect.
Option 1 is incorrect. Simply setting a 30-day TTL without a versioning approach can result in outdated images remaining in the cache until the TTL expires or until a manual purge is done.
- B. Incorrect.
Option 2 is incorrect. Ignoring query strings means the CDN treats all requests the same, preventing it from seeing updates based on query parameters (e.g., revised version numbers).
- C. Correct.
Option 3 is correct. A versioning strategy (e.g., appending a version number to filenames or using query parameters) prompts the CDN to consider new image file versions and avoid serving stale content.
- D. Incorrect.
Option 4 is incorrect. Disabling caching entirely contradicts the goal of a 30-day TTL for performance and would lead to unnecessary origin load.