Skip to main content
NageshRaja
Level 5
October 6, 2026
Question

Validate CDN Caching Disabled

  • October 6, 2026
  • 3 replies
  • 20 views

Hi All,

 

I am trying to disable CDN caching in AEM Cloud - 

As per https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/caching/how-to/disable-caching we can do the below - 

<LocationMatch "$URL$ || $URL_REGEX$">
# Removes the response header of this name, if it exists. If there are multiple headers of the same name, all will be removed.
Header unset Cache-Control
Header unset Surrogate-Control
Header unset Expires

# Instructs the Browser and the CDN to not cache the response.
Header always set Cache-Control "private"

# Instructs only the CDN to not cache the response.
Header always set Surrogate-Control "private"
</LocationMatch>

However, there is no mention on how to validate the same?

I did add the above property in my vhost file but the CDN logs still show the cache as HIT versus MISS or PASS.

<LocationMatch "^/etc\.clientlibs/.*\.(js|css)$">
Header unset Cache-Control
Header unset Surrogate-Control
Header unset Expires

Header always set Surrogate-Control "private"
</LocationMatch>

The logs below still show the cache as HIT - What am I missing?

{"timestamp":"2026-10-06T05:53:53+0000","ttfb":248,"ttlb":249,"cli_ip":"23.44.4.166","cli_country":"SG","cli_region":"SG-01","rid":"a3d000e5-e7c7-49a0-86dd-f97e92802165","req_ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/154.0.0.0 Safari/537.36","aem_envKind":"SKYLINE","aem_tenant":"abcglobalcom","host":"abc.com","url":"/etc.clientlibs/abc-platform/clientlibs/clientlib-base.min.css","method":"GET","res_ctype":"text/css;charset=utf-8","cache":"HIT",debug":"","res_age":"1010401","status":200,"pop":"SIN","rules":"","alerts":"","sample":"","ddos":false}

Thanks in advance,

NK

3 replies

AmitVishwakarma
Community Advisor
Community Advisor
October 6, 2026

Hi ​@NageshRaja 
cache=HIT by itself does not confirm that the new vhost rule failed. It means the CDN served an existing cached object without fetching the response from AEM, so the new response headers were not evaluated for that request.

For CSS client libraries, Adobe's guide notes that bypassing an existing cached CSS object requires changing the CSS file to generate a new cache key. Please test with a changed/versioned CSS URL after confirming the vhost change was successfully deployed to the correct environment. Then check the response headers and the CDN log for that URL. In the CDN logs, HIT means served from cache; PASS means the response was explicitly marked not to be cached and is retrieved from AEM.

If a new URL/cache key still shows HIT, verify that the LocationMatch pattern matches the requested URL and that the rule is present in the active vhost. Also note that vhost cache headers control CDN behavior; they do not disable Dispatcher caching.
https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/caching/how-to/disable-caching
https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/caching/cdn-cache-hit-ratio-analysis
https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/caching/publish

Amit Vishwakarma - Adobe Commerce Champion 2025 | 17x Adobe certified | 6x Adobe SME
NageshRaja
Level 5
October 6, 2026

I did purge the cache and hit again but got CACHE=HIT
If you see the cURL output below - 
Surrogate-Control never shows up here

 

AmitVishwakarma
Community Advisor
Community Advisor
October 6, 2026

Hi ​@NageshRaja 
Thanks for checking. A HIT means the CDN served a cached object without fetching a new response from AEM. So it does not, by itself, show whether the updated vhost rule is active: the request may still be using an existing cache entry, or the rule may not be affecting the response.

For a clean test, Adobe's guide specifically recommends changing the CSS file to generate a new cache key when bypassing an existing cached CSS client library. Deploy the vhost change to the target Publish environment, then request that new CSS URL and check the corresponding CDN log entry. A PASS means the response was marked not to be cached and is fetched from AEM; a MISS means the URL was not in cache and was fetched from AEM; a HIT means it was served from cache.

 

Your snippet sets Surrogate-Control: private. Check the actual response headers for the new URL to confirm that header is present and that no other cache header is overriding the intended behavior. Adobe's CSS-specific example uses Cache-Control: private; try that documented example for a controlled test if needed. Also verify that the rule is enabled in the deployed vhost, matches the exact requested path, and is deployed to the environment serving abc.com.

If the new URL still logs HIT, confirm that you are checking the exact hostname, path, and request made after the purge; then review the deployed vhost and response headers. A HIT cannot validate headers from a fresh AEM response because that request did not fetch one from AEM.

https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/caching/how-to/disable-caching

https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/caching/cdn-cache-hit-ratio-analysis

Amit Vishwakarma - Adobe Commerce Champion 2025 | 17x Adobe certified | 6x Adobe SME