Soru

Zorluk: ZorConfigure and Manage Azure CDN Endpoints and Caching Rules

You are configuring caching rules for an Azure CDN Standard from Microsoft endpoint. The origin server hosts a web application with the following requirements:

* JSON configuration files located in the `/config/` directory must be cached on the CDN for exactly 2 hours, regardless of any `Cache-Control` headers returned by the origin server.
* Media files located in the `/media/` directory must honor the `Cache-Control` header set by the origin server. If the origin server does not return a `Cache-Control` header, the CDN must cache these files for 5 days.
* For all requests to the endpoint, any query string parameters must be ignored by the CDN, and the same cached asset must be served to all users.

Which configuration should you apply to the CDN endpoint?

  1. Query string caching behavior: Ignore query strings; Custom caching rule for /config/*: Caching behavior set to Override with a duration of 2 hours; Custom caching rule for /media/*: Caching behavior set to Set if missing with a duration of 5 daysCevap
  2. B
    Query string caching behavior: Bypass caching; Custom caching rule for /config/*: Caching behavior set to Override with a duration of 2 hours; Custom caching rule for /media/*: Caching behavior set to Set if missing with a duration of 5 days
  3. C
    Query string caching behavior: Ignore query strings; Custom caching rule for /config/*: Caching behavior set to Set if missing with a duration of 2 hours; Custom caching rule for /media/*: Caching behavior set to Override with a duration of 5 days
  4. D
    Query string caching behavior: Cache every unique URL; Custom caching rule for /config/*: Caching behavior set to Bypass cache with a duration of 2 hours; Custom caching rule for /media/*: Caching behavior set to Set if missing with a duration of 5 days

Cevap

The configuration that sets Query string caching behavior to 'Ignore query strings', the custom caching rule for `/config/*` to 'Override' with a 2-hour duration, and the custom caching rule for `/media/*` to 'Set if missing' with a 5-day duration.
The correct configuration requires setting the global query string caching behavior to 'Ignore query strings' to ensure that query parameters are not used to generate separate cache entries. For the configuration files under `/config/*`, setting the custom caching behavior to 'Override' ignores the origin's Cache-Control header and applies the 2-hour duration. For media files under `/media/*`, setting the custom caching behavior to 'Set if missing' honors the origin's Cache-Control header if it exists and uses the 5-day duration only when the header is missing.

Adım Adım Çözüm

1
Select the correct Query String caching behavior.
Query string caching behavior: Ignore query strings
The requirement states that query string parameters must be ignored by the CDN so that the same cached asset is served regardless of the query parameters.
2
Configure the custom caching rule for configuration files under `/config/`.
Caching behavior: Override; Duration: 2 hours
To cache files for exactly 2 hours regardless of the origin server's Cache-Control headers, the 'Override' behavior must be used to ignore the origin's caching instructions.
3
Configure the custom caching rule for media files under `/media/`.
Caching behavior: Set if missing; Duration: 5 days
To honor the origin server's Cache-Control headers when present and only apply the 5-day duration when the headers are absent, the 'Set if missing' behavior must be used.

Anahtar Kavram

Azure CDN Caching Rules and Query String Caching Behavior
Tahmini Süre:2m 0s
Bu soruyu puanla