Question

Difficulty: EasyConfigure and Manage Azure CDN Endpoints and Caching Rules

A developer is configuring an Azure CDN endpoint to distribute web pages for an online learning portal. The portal loads different course pages using a query string, such as `courses.html?courseid=42`. The developer must ensure that the CDN caches a unique version of the page for each individual course ID. Which query string caching behavior should the developer configure on the endpoint?

  1. A
    Ignore query strings
  2. Cache every unique URLAnswer
  3. C
    Bypass caching
  4. D
    No caching

Answer

The developer should configure the 'Cache every unique URL' query string caching behavior.
Configuring the CDN to 'Cache every unique URL' forces the CDN to treat each query string variation as a distinct resource. This ensures that a unique version of the page is cached and served for each unique course ID.

Step-by-Step Solution

1
Identify the requirement to cache unique pages based on query parameters.
The CDN must differentiate requests based on the query parameter value.
Since each course ID displays unique content, caching must be parameter-aware.
2
Compare Azure CDN query string caching behaviors.
Identify that 'Ignore query strings' caches only one version, 'Bypass caching' does not cache anything with query strings, and 'Cache every unique URL' caches a version for each unique query parameter.
Selecting the appropriate setting matches the specific performance and correctness requirements of the application.
3
Select the behavior that caches each version of the page.
The 'Cache every unique URL' behavior is chosen.
This configuration treats every unique URL query combinations as a unique asset, satisfying the requirement.

Key Concept

Azure CDN query string caching behaviors allow developers to control how requests with query parameters are cached, ensuring dynamic content is either cached per query, bypassed, or cached uniformly.
Rate this question