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.
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!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @RahulSi13
x-cache header can be different for different CDN or CDN just removing those headers, please check the settings at Other CDN
Views
Replies
Total Likes
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.
@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!
Views
Replies
Total Likes
Hi @RahulSi13
x-cache header can be different for different CDN or CDN just removing those headers, please check the settings at Other CDN
Views
Likes
Replies
Views
Likes
Replies