how to implement automated akaimai cache clearing process on replication/publishing a page/multiple pages for multi-domain environment setup in AMS(6.5.x) | Community
Skip to main content
Level 2
April 27, 2022
Solved

how to implement automated akaimai cache clearing process on replication/publishing a page/multiple pages for multi-domain environment setup in AMS(6.5.x)

  • April 27, 2022
  • 3 replies
  • 2022 views

we support multi-domain web sites in the project and trying to create a automated process to clear the cache from akamai when a page published/replicated. we have AMS environment  with AEM 6.5.x and will be using Akamai purge rest api.  what are the steps we do on the AEM side. I was trying to follow this approach
""create an event handler and listen to replication type and send the post request to akamai purge rest api""

with this process I see some concerns as below

a. how do I find out the domain names for the pages to send it to akaimai api

b. whenever we publish a page with assets as part of it, it will trigger multiple  requests to akamai.  I wanted to make it as single request to the page specific resource to clear the cache.

c. will this supports the  tree activation? if yes,  will the akamai servers can handle multiple requests. 

d. do we need to  add the logic to configure proxy in the code

 

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Ravi_Pampana

Hi,

 

You can handle by implementing preprocessor and add the urls to a node and using scheduler which can run every min/5min based on your requirement call the Akamai API purge and send cache clear requests in batches. 

 

You can add the domain names to the parent node , using inheritance read the domain name based on the path.

 

Yes, Akamai support multiple urls upto around 50 urls in one request.

 

@8220494(service = Preprocessor.class, immediate = true)

public class PreActivateListener implements Preprocessor {

 

@9944223

public void preprocess(ReplicationAction arg0, ReplicationOptions arg1) throws ReplicationException {

3 replies

Ravi_Pampana
Community Advisor
Ravi_PampanaCommunity AdvisorAccepted solution
Community Advisor
April 27, 2022

Hi,

 

You can handle by implementing preprocessor and add the urls to a node and using scheduler which can run every min/5min based on your requirement call the Akamai API purge and send cache clear requests in batches. 

 

You can add the domain names to the parent node , using inheritance read the domain name based on the path.

 

Yes, Akamai support multiple urls upto around 50 urls in one request.

 

@8220494(service = Preprocessor.class, immediate = true)

public class PreActivateListener implements Preprocessor {

 

@9944223

public void preprocess(ReplicationAction arg0, ReplicationOptions arg1) throws ReplicationException {

arunpatidar
Community Advisor
Community Advisor
April 28, 2022

You can explore Adobe IO option if using Cloud Manager.

This is bascially an event driven framework, which calls api based on some event,

so in your case you can call CDN cache invalidation on publish event.

 

https://developer.adobe.com/runtime/docs/guides/

Arun Patidar
Level 3
February 7, 2024

Hi @rajashekharreddy0707 ,

Curious to know how did you implement the aem akamai purge integration.
How did you ensure dispatcher cache is flushed before a single akamai purge request is issued. 
From which environment and on which event are you making the akamai purge request. 
Did you face any challenges during tree-activation. 

Thanks