Soru

Zorluk: OrtaConfigure and Manage Azure CDN Endpoints and Caching Rules

An API hosted on Azure App Service serves real-time inventory updates via an Azure CDN Standard from Microsoft endpoint. The requests use a query string to specify a store location (e.g., `/inventory/status?storeId=99`). You need to ensure that requests to `/inventory/status` always bypass the CDN cache and fetch the latest inventory data directly from the origin. Other paths on the same endpoint, such as `/assets/images`, must continue to cache assets based on their query strings. Which configuration should you apply to the CDN endpoint to meet these requirements?

  1. A
    Configure the global query string caching behavior of the endpoint to Bypass caching for query strings.
  2. Create a custom caching rule for the path `/inventory/status` and set the caching behavior to Bypass cache.Cevap
  3. C
    Configure the global query string caching behavior of the endpoint to Ignore query strings.
  4. D
    Create a custom caching rule for the path `/inventory/status` and set the caching behavior to Set if missing.

Cevap

Create a custom caching rule for the path `/inventory/status` and set the caching behavior to Bypass cache.
Creating a custom caching rule for the path `/inventory/status` with a 'Bypass cache' behavior ensures that all requests matching this path are not cached by the CDN and are sent directly to the origin. This allows other paths on the endpoint to continue caching normally using their query strings.

Adım Adım Çözüm

1
Analyze the requirement to disable caching for a specific endpoint path while keeping query string caching for other paths.
Identified that global query string configurations will not work because they apply endpoint-wide and would affect all paths.
Global query string behaviors like 'Bypass caching for query strings' or 'Ignore query strings' cannot be scoped to a single path.
2
Select the appropriate Azure CDN configuration mechanism for path-level overrides.
Determined that a custom caching rule matched by path is required.
Custom caching rules allow fine-grained control over caching behaviors based on specific request paths.
3
Determine the correct caching behavior to completely prevent CDN caching of the inventory path.
Selected the 'Bypass cache' behavior.
Setting the behavior to 'Bypass cache' instructs the CDN edge not to cache matching assets and to fetch them directly from the origin.

Anahtar Kavram

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