Expand my Community achievements bar.

SOLVED

AEM Cloud CDN not showing latest content

Avatar

Level 2

 

We are trying to hit AEMaaCS(using fastly) URL from multiple locations and it seems all users are seeing different content of a page.

 

User A is seeing CTA with text Cta 2 and User B is seeing CTA with text Cta 6, while the actual content should be showing CTA 7. Any idea what could be going wrong? Below are detailed information about our observation so far.

 

We have setup surrogate control as per this document(https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/conten...) to 24 hours which caches the page for 24 hours.

 

We have also cleared CDN cache using below command, but results are always same. Showing old and different content for different locations.
curl -X PURGE -H "Fastly-Soft-Purge:1" https://domain/url.html -H "x-aem-purge-key:PURGE_KEY"

 

While checking CDN logs, we always see HIT in logs instead of seeing MISS(as we cleared CDN Cache). Below are CDN logs, it seems like response age is different for both locations. We didn't receive request in dispatcher, so not sharing any dispatcher logs.

Person A's request from Trichy Location
{"timestamp":"2024-02-29T04:21:53+0000","ttfb":2,"cli_ip":"IP_ADDRESS","cli_country":"IN","rid":"XXb","req_ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0","host":"DOMAIN","url":"URL.html","method":"GET","res_ctype":"text/html;charset=utf-8","cache":"HIT","debug":"","res_age":"61082","status":200,"pop":"MAA","rules":"","alerts":"","aem_ims_org_id":"xxx@AdobeOrg","aem_tenant_id":"xxx","aem_program_id":"xxx","aem_env_id":"xxx","aem_program":"xxx","aem_env_name":"xxx"}
Person B's request from Hyderabad Location
{"timestamp":"2024-02-29T04:30:17+0000","ttfb":3,"cli_ip":"IP_ADDRESS","cli_country":"IN","rid":"XXX","req_ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0","host":"DOMAIN","url":"URL.html","method":"GET","res_ctype":"text/html;charset=utf-8","cache":"HIT","debug":"","res_age":"1715","status":200,"pop":"BOM","rules":"","alerts":"","aem_ims_org_id":"xxx@AdobeOrg","aem_tenant_id":"xxx","aem_program_id":"xxx","aem_env_id":"xxx","aem_program":"xxx","aem_env_name":"xxx"}

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@akash_mca2008 

Can you try purging cache using below format instead of using soft purge

curl -X PURGE -H 'x-aem-purge-key: PURGE_KEY' https://domain/url.html

 

 

 

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

@akash_mca2008 

Can you try purging cache using below format instead of using soft purge

curl -X PURGE -H 'x-aem-purge-key: PURGE_KEY' https://domain/url.html

 

 

 

Avatar

Level 2

Thanks @AMANATH_ULLAH and @iamnjain . That helped. 

I should have caught that one. Appreciate your response.

If possible, just help me with one mystery, if the cache wasn't cleared properly. Why is it still that two users were seeing different content. Shouldn't both be seeing same cached content.

Avatar

Community Advisor

Looks like individual browser cache content being served.

Avatar

Community Advisor

@akash_mca2008 What is the page content when you try to hit the URL with query param "?123". It should be cache "MISS" and try clearing cache using curl -X PURGE -H 'x-aem-purge-key: PURGE_KEY' https://domain/url.html as @AMANATH_ULLAH mentioned in comment.

 

Let us know if it helped.