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?
- AConfigure the global query string caching behavior of the endpoint to Bypass caching for query strings.
- Create a custom caching rule for the path `/inventory/status` and set the caching behavior to Bypass cache.Cevap
- CConfigure the global query string caching behavior of the endpoint to Ignore query strings.
- DCreate 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
Anahtar Kavram
Azure CDN Caching Rules and Query String Caching Behavior
Tahmini Süre:1m 30s