Caching
AEM integrates with the AEM CDN Fastly. This means that JSON responses served on the publish tier are cached at the Fastly level.
Responses are then cached, based on predefined caching headers (cannot be configured):
- Responses are cached for 5 minutes in the browser/client cache
max-age
=300
- Responses are cached for 1 hour on the CDN cache
s-maxage
=3600
- Stale content can be served while revalidating new requests for up to 1 hour
stale-while-revalidate
=3600
- Stale content can be served, by error, for up to 1 day
stale-on-error
=86400
AEM also comes with active CDN cache invalidation. This means that whenever content is updated, or published, the corresponding JSON OpenAPI responses are automatically invalidated, via a soft purge request to Fastly. This allows you to see changes reflected in the JSON output, before the actual CDN cache age (s-maxage
) is reached.