Soru

Zorluk: OrtaConfigure and Manage Azure CDN Endpoints and Caching Rules

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.)

  1. Configure the query string caching behavior to Cache every unique URL.Cevap
  2. Create a custom caching rule for the path /api/inventory/status and set the caching behavior to Bypass cache.Cevap
  3. C
    Configure the query string caching behavior to Ignore query strings.
  4. D
    Configure the query string caching behavior to Bypass caching for query strings.

Cevap

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.

Adım Adım Çözüm

1
Analyze caching requirements for the search query parameters.
To cache each unique query string independently, the CDN needs to recognize query strings as unique assets. This requires setting the query string caching behavior to Cache every unique URL.
This configuration ensures that requests with different query parameter values are cached and served separately.
2
Analyze caching requirements for the real-time API endpoint.
The path `/api/inventory/status` must bypass the CDN cache entirely to ensure real-time inventory data is retrieved from the origin.
Creating a custom caching rule targeting the `/api/inventory/status` path with a Bypass cache setting prevents the CDN from caching any responses for this endpoint.

Anahtar Kavram

Azure CDN caching rules and query string caching behavior configuration
Bu soruyu puanla