Soru

Zorluk: OrtaConfigure and Manage Azure CDN Endpoints and Caching Rules

You are developing an Azure CDN solution to distribute localized product description pages for an e-commerce website. The application uses a query string parameter to retrieve the localized content (for example, `https://cdn.contoso.com/products/info?lang=en` and `https://cdn.contoso.com/products/info?lang=fr`). You discover that French-speaking users are frequently served cached English pages. You must resolve this issue by ensuring that the CDN caches and serves the correct language variant for each request while still utilizing caching to improve response times. Which query string caching behavior should you configure on the CDN endpoint?

  1. Cache every unique URLCevap
  2. B
    Ignore query strings
  3. C
    Bypass caching
  4. D
    Override cache duration

Cevap

Cache every unique URL
The correct answer is to configure the 'Cache every unique URL' behavior. When this setting is enabled, each request with a unique URL, including the query string parameters, is treated as a separate asset with its own cache. This ensures that a request for the English page is cached and served separately from a request for the French page, while still taking advantage of CDN caching to optimize response times.

Adım Adım Çözüm

1
Analyze the requirement to cache distinct page versions based on localized query string values (lang=en and lang=fr) while keeping caching enabled.
Identify that the CDN needs to treat query strings as part of the cache key rather than ignoring them or bypassing caching entirely.
Choosing the correct query string behavior is necessary to prevent users from receiving mismatched language content.
2
Evaluate the query string caching options available in Azure CDN.
Determine that 'Ignore query strings' serves the same cached version to everyone, and 'Bypass caching' turns off caching for these pages. Only 'Cache every unique URL' caches each variant separately.
This matches the criteria of serving the correct language while maintaining CDN caching benefits.

Anahtar Kavram

Azure CDN Query String Caching Behavior determines how requests with query parameters are cached on edge nodes.
Bu soruyu puanla