AEM Dispatcher Configuration Mistakes That Cause Cache Misses

By Alberto Zarza Martín · · 6 min read

A surprising number of AEM performance complaints trace back to a Dispatcher that is technically working, but caching almost nothing. Here are the mistakes that show up most often in real configurations.

1. Overly broad "no-cache" rules

A single overly aggressive rule in /cache/rules — often written to solve one specific personalization case — can accidentally exclude entire sections of the site from caching. Audit cache rules by testing actual URL paths against them, not just reading the rule file and assuming intent matches behavior.

2. Cache-busting query parameters

If analytics or campaign tracking parameters (utm_*, session IDs) are not stripped before the Dispatcher cache key is computed, every unique campaign link creates its own cache entry — or bypasses cache entirely. Configure /ignoreUrlParams deliberately rather than leaving it at defaults.

3. Missing or misconfigured Cache-Control headers from AEM

Dispatcher respects headers set by AEM itself in many configurations. If your Sling servlets or components are not setting sensible Cache-Control or Expires headers, downstream CDN and browser caching layers cannot do their job even if Dispatcher itself is configured correctly.

4. Invalidation that is too aggressive

Some replication/flush setups invalidate far more of the cache than the actual content change requires — for example, flushing an entire site section on every minor asset update. This keeps cache hit ratio artificially low because content is constantly being re-fetched from origin.

5. Not testing with realistic traffic patterns

A Dispatcher configuration that looks correct in a load test with five repeated requests can behave very differently under real traffic with varied query strings, cookies, and user agents. Validate cache hit ratio against production-like traffic samples, not synthetic smoke tests.

Quick diagnostic

Check the X-Cache or equivalent header (or your CDN's cache status header) against a sample of real production URLs. If hit ratio is low across the board rather than on a few specific paths, the issue is usually rule 1 or 3 above — a global misconfiguration rather than a content-specific one.