You are configuring caching for an Azure CDN Standard from Microsoft endpoint. The endpoint distributes content for a web application that includes:
- Static product images under `/images/products/` which should be cached long-term.
- An API endpoint at `/api/inventory/status` that returns real-time stock levels and must not be cached by the CDN.
- A search page at `/search` that displays results based on a query parameter named `q`. Each unique search query must be cached independently to optimize performance for recurring searches.
Which two configuration settings should you apply to the Azure CDN endpoint? (Select two.)
- Configure the query string caching behavior to Cache every unique URL.Answer
- Create a custom caching rule for the path /api/inventory/status and set the caching behavior to Bypass cache.Answer
- CConfigure the query string caching behavior to Ignore query strings.
- DConfigure the query string caching behavior to Bypass caching for query strings.
Answer
Configure the query string caching behavior to Cache every unique URL, and create a custom caching rule for the path /api/inventory/status set to Bypass cache.
To support caching unique search terms, the CDN must cache every unique URL separately. To prevent caching of real-time inventory API responses, a custom bypass rule for the path is required.
Step-by-Step Solution
Key Concept
Azure CDN caching rules and query string caching behavior configuration