Issue with Missing x-cache Header on Certain CDNs in AEM as a Cloud Service
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!