Issue with Missing x-cache Header on Certain CDNs in AEM as a Cloud Service | Community
Skip to main content
Level 2
February 7, 2025
Solved

Issue with Missing x-cache Header on Certain CDNs in AEM as a Cloud Service

  • February 7, 2025
  • 4 replies
  • 1138 views

I'm working on an AEM as a Cloud Service project where I have cache-control rules set in the response headers.I receive the following headers in my response:

accept-ranges: bytes
age: 76
cache-control: max-age=1800, stale-while-revalidate=1800, stale-if-error=1800, public, immutable
content-encoding: gzip
content-length: 27820
content-type: text/css;charset=utf-8
date: Thu, 06 Feb 2025 13:47:49 GMT
last-modified: Thu, 06 Feb 2025 13:46:28 GMT
strict-transport-security: max-age=31500
vary: Accept-Encoding
x-cache: HIT
x-content-type-options: nosniff
x-frame-options: Origin
x-served-by: cache-BOM
x-timer: VE13
x-vhost: my project

However, I'm noticing inconsistent behavior with the x-cache header. In some cases, when served by certain CDNs (e.g., x-served-by: cache-BOM), I see x-cache: HIT or x-cache: MISS, indicating whether the request was served from cache.

But with other CDNs (e.g., x-served-by: cache-Hyd), the x-cache header is completely missing from the response, even though the response clearly indicates which CDN served the request.

 

Question:

Could this missing x-cache header be caused by the CDN that served the request? Or are there other possible reasons why it is not being included in the response?

Any insights would be appreciated!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

Hi @rahulsi13 

x-cache header can be different for different CDN or CDN just removing those headers, please check the settings at Other CDN

4 replies

RahulSi13Author
Level 2
February 7, 2025
narendiran_ravi
Level 6
February 9, 2025

Hi @rahulsi13 ,

Do you see this difference in the presence of the X-Cache header for similar requests when different CDNs serve the content?

To investigate, check the Cache-Control header for the requests where the X-Cache header is missing. It may provide insights into whether caching rules are affecting the response.

kautuk_sahni
Community Manager
Community Manager
February 10, 2025

@narendiran_ravi Did you find the suggestion helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!

Kautuk Sahni
arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
February 10, 2025

Hi @rahulsi13 

x-cache header can be different for different CDN or CDN just removing those headers, please check the settings at Other CDN

Arun Patidar