Fastly CDN not caching the content properly
Hi all,
We are using 6.5 on-prem with a Fastly CDN in front of our Apache Dispatcher. Despite setting proper cache headers in our dispatcher.any and Apache config, some pages are not being cached by Fastly (we verified using their cache inspection tools).
Here is a simplified example of what we send from Apache (verified with curl -I):
HTTP/1.1 200 OK
Content-Type: text/html
Cache-Control: max-age=300, public
X-Cache: MISS
X-Served-By: cache-bom4743-BOM
Apache configuration:
Header set Cache-Control "max-age=300, public"
Even with Cache-Control: max-age=300, public, Fastly often bypasses cache (X-Cache: MISS) or marks the response as unavailable for caching.
Are there any specific headers (like Surrogate-Control or Age) that I should explicitly set—alongside Cache-Control - to ensure Fastly caches AEM content properly, and could AEM Dispatcher’s /cache rules conflict with Fastly’s caching behavior?