CASE 11 / CACHING / PERFORMANCE / DELIVERY

AEM Dispatcher and CDN Caching: Keys, Invalidation and Freshness

An AEM caching strategy must explain both when a response can be reused and when it becomes stale. This representative design separates Dispatcher eligibility from CDN behavior, with explicit tests for query parameters, publication and user-specific content.

SHARE
LinkedIn X Facebook Threads

Engineering path

Engineering path

Proposed engineering sequence

  1. 01Request identity
  2. 02CDN
  3. 03Dispatcher
  4. 04Publish
  5. 05Freshness checks

01 / Context

Write a cache contract for each response class

PLATFORM
Dispatcher / CDN
SCOPE
AEM Dispatcher and CDN cache correctness
TYPE
Representative engineering scenario

Classify public pages, content APIs, assets and user-specific responses before editing rules. The same caching assumptions should not be applied indiscriminately to every request served by the platform.

02 / THE ENGINEERING PROBLEM

A high hit rate can still serve the wrong response

Ignoring an output-changing query parameter or reusing a private response can make caching incorrect even when it appears fast. Freshness and response identity are part of the design, not secondary performance checks.

03 / CONSTRAINTS

Boundaries the design must preserve

  1. Do not merge responses that differ by access state or meaningful parameters.
  2. Assess CDN freshness separately from Dispatcher invalidation.

04 / ARCHITECTURE

Treat Dispatcher and CDN as independent cache layers

Document the request path and the cache rules at each layer. A Dispatcher invalidation does not, by itself, prove that a separate CDN response is fresh; verify the configured relationship and expiration behavior.

SYSTEM / FLOW

System boundaries

Owns cache policy; production troubleshooting owns evidence collection across the whole request path.

AEM DISPATCHER AND CDN CACHE CORRECTNESSRequest identityCDNDispatcherPublishFreshness checks

AEM Dispatcher and CDN cache correctness

  1. Request identity
  2. CDN
  3. Dispatcher
  4. Publish
  5. Freshness checks

05 / IMPLEMENTATION

Separate request filtering from cache eligibility

Review which requests may reach AEM independently from which responses may be cached. For query parameters, ignore only values demonstrated not to affect the response; retain a deliberate policy for personalization and authenticated access.

Implementation checkpoints

Proposed engineering checks for this scenario.

  1. 01List expected cacheable URL shapes and response classes.
  2. 02Review invalidation rules alongside content publication behavior.
  3. 03Inspect actual response headers and cached responses at each boundary.

06 / TECHNICAL DECISIONS

Validate response identity before increasing cache reuse

Compare responses for parameter variants and access states before changing cache policy. A convenient rule that merges distinct responses is a correctness defect, not a performance optimization.

07 / TRADEOFFS

Freshness has an operational cost

Broad invalidation can cause avoidable origin work; narrow invalidation can leave dependencies stale if their relationships are not modeled. Choose a policy with explicit freshness expectations and test dependent pages.

Risks to resolve
RiskImpactMitigation to validate
Wrong cache keyA distinct or private response is reusedCompare parameter and authentication variants
Incomplete invalidationDependent content stays stalePublish changes and inspect each delivery boundary

When the failing layer is not yet known, start with evidence-led AEM production troubleshooting.

08 / VALIDATION

Test cold, warm and changed content states

Use the same request fixtures across cache layers so the comparison is meaningful.

Acceptance scope and limits

TO VALIDATE

Proposed checks, not captured results.

  • Compare anonymous and authenticated behavior where applicable.
  • Vary query parameters and confirm expected response identity.
  • Publish an update and inspect delivery before and after invalidation or expiry.

DOES NOT CLAIM

Owns cache policy; production troubleshooting owns evidence collection across the whole request path.

  • A completed customer deployment or measured production outcome
  • A passing test run without retained execution evidence

09 / LESSONS LEARNED

Cache correctness comes before cache efficiency

Keep rules reviewable and attach a reason to each exception. This study defines a validation approach; it does not assert measured latency or cache-hit improvements.

Technical references

These sources document product behavior. The scenario and proposed validation are engineering interpretations, not vendor claims or execution evidence.

10 / CONTINUE EXPLORING

Related engineering work

Related Lab notes

11 / SHARE

SHARE THIS CASE STUDY

SHARE
LinkedIn X Facebook Threads

Working through a similar platform problem?

Start a conversation