
For example, the following would prevent html content under a directory named secure from being cached at the CDN. To prevent specific content from being cached at the CDN, set the Cache-Control header to private.

You must ensure that a file under src//cache has the following rule (which is in the default configuration): /0000 Header always set Cache-Control "max-age=200" In order to force AEM to always apply the caching headers, one can add the always option as follows: With that said, AEM as a Cloud Service will remove the cache header if it detects that it has been applied to what it detects to be uncacheable by dispatcher, as described in dispatcher documentation. Consider using multiple directives to ensure rules are applied in a fine-grained manner. If using a customer managed CDN, a different header may be required depending on your CDN provider.Įxercise caution when setting global cache control headers or those that match a wide regex so they are not applied to content that you might intend to keep private. The Surrogate-Control header applies to the Adobe managed CDN. Header set Surrogate-Control "max-age=3600" That said, please exercise caution when turning off default caching.Ĭan be overridden for all HTML/Text content by defining the EXPIRATION_TIME variable in global.vars using the AEM as a Cloud Service SDK Dispatcher tools.Ĭan be overridden on a finer grained level, including controlling CDN and browser cache independently, with the following apache mod_headers directives: This can be useful, for example, when your business logic requires fine tuning of the age header (with a value based on calendar day) since by default the age header is set to 0. the default HTML/Text caching setting can be disabled by defining the DISABLE_DEFAULT_CACHING variable in global.vars:.by default, cached by the browser for five minutes, based on the cache-control header emitted by the apache layer.This page also describes how dispatcher cache is invalidated, as well as how caching works at the browser level with regards to client-side libraries.

Note that dispatcher also respects the resulting cache expiration headers if enableTTL is enabled in the dispatcher configuration, implying that it will refresh specific content even outside of content being republished. Rules can be applied to the dispatcher configuration to modify any default cache expiration settings, resulting in caching at the CDN. In order to increase performance, the dispatcher is used primarily as a cache to limit processing on the publish nodes.

Traffic passes through the CDN to an apache web server layer, which supports modules including the dispatcher.
