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.
Engineering path
Engineering path
Proposed engineering sequence
- 01Request identity
- 02CDN
- 03Dispatcher
- 04Publish
- 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
- Do not merge responses that differ by access state or meaningful parameters.
- 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 boundaries
Owns cache policy; production troubleshooting owns evidence collection across the whole request path.
AEM Dispatcher and CDN cache correctness
- Request identity
- CDN
- Dispatcher
- Publish
- 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.
- 01List expected cacheable URL shapes and response classes.
- 02Review invalidation rules alongside content publication behavior.
- 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.
| Risk | Impact | Mitigation to validate |
|---|---|---|
| Wrong cache key | A distinct or private response is reused | Compare parameter and authentication variants |
| Incomplete invalidation | Dependent content stays stale | Publish 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.