Dear Members,
I am using AEMAaCS setup. Facing issue on Akamai CDN. When I publish the page from AEMAaCS author to publish, Akamai is still serving old content. We have disabled fastly CDN as receommended by Adobe through the Header set Surrogate-Control "max-age=0"
Content is showing immediately on Adobe publisher environment.
Below is vhost file snippet for the given domain.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Folks,
This was quite tricky as customer managed CDN has different headers and Adobe managed CDN has different. We are using customer managed CDN Akamai.
Akamai has path based cache invalidation API, where multiple path(s) can be passed in API payload.
Akamai POST API (https://techdocs.akamai.com/purge-cache/reference/invalidate-url) can be invoked through sling event handler upon page publishing.
Since we are not going to write any code so manually cache invalidation is the option we are opting for now.
Thanks everyone for posting your valuable thoughts. Appreciated.
Thanks,
Pradeep
@pradeepdubey82 You can try creating a akamai cache invalidation service that can be invoked from within a event handler that listens to a page activation event. The payload in this case is page and the same can be passed to this cache invalidation service.
Hi Harwinder-singh,
We are not planning to write event handler for this. Is there any way to achieve through cache control headers?
Cache the page for 1 day on CDN, invalidate as soon as page published.
Thanks,
Pradeep
Hi @pradeepdubey82 ,
You can use postman/curl commands to purge the cache. Here is an article from @Imran__Khan which may help you. Pls check the same .
https://javadoubts.com/cloudflare-cdn-purge-cache/
Thanks,
Somen
@pradeepdubey82 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Hi Folks,
This was quite tricky as customer managed CDN has different headers and Adobe managed CDN has different. We are using customer managed CDN Akamai.
Akamai has path based cache invalidation API, where multiple path(s) can be passed in API payload.
Akamai POST API (https://techdocs.akamai.com/purge-cache/reference/invalidate-url) can be invoked through sling event handler upon page publishing.
Since we are not going to write any code so manually cache invalidation is the option we are opting for now.
Thanks everyone for posting your valuable thoughts. Appreciated.
Thanks,
Pradeep