You are developing an Azure CDN solution to distribute localized product description pages for an e-commerce website. The application uses a query string parameter to retrieve the localized content (for example, `https://cdn.contoso.com/products/info?lang=en` and `https://cdn.contoso.com/products/info?lang=fr`). You discover that French-speaking users are frequently served cached English pages. You must resolve this issue by ensuring that the CDN caches and serves the correct language variant for each request while still utilizing caching to improve response times. Which query string caching behavior should you configure on the CDN endpoint?
- Cache every unique URLAnswer
- BIgnore query strings
- CBypass caching
- DOverride cache duration
Answer
Cache every unique URL
The correct answer is to configure the 'Cache every unique URL' behavior. When this setting is enabled, each request with a unique URL, including the query string parameters, is treated as a separate asset with its own cache. This ensures that a request for the English page is cached and served separately from a request for the French page, while still taking advantage of CDN caching to optimize response times.
Step-by-Step Solution
Key Concept
Azure CDN Query String Caching Behavior determines how requests with query parameters are cached on edge nodes.