Flush Cache in Akamai | Community
Skip to main content
Level 2
October 16, 2015
Solved

Flush Cache in Akamai

  • October 16, 2015
  • 3 replies
  • 7658 views

Hi,

If any changes published then CQ Dispatcher cache have the latest published content but in Akamai it is having the old content, that means no information triggered to Akamai if any content is published, kindly can anyone help me how to write trigger that if any changes published then trigger to Akamai cache and flush the modified content and cache it.

Thanks and Regards,

Srinivasan.

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 smacdonald2008

Here is a reply from a Senior AEM Consultant on this:

**************************************************************************************************************

I don’t believe there is anything in the product to perform the cache flush requests for you, however my understanding is that Akamai does have a REST API and you can implement a call to that API from AEM.

Doing a quick search on google you can find a couple of different implementations [1][2] that people have shared.

It should also be possible to write a script that purges the Akamai cache and you can then invoke it from the dispatcher [3].

[1] http://www.velir.com/blog/index.php/2014/07/09/easily-integrate-akamai-into-adobe-cq-aem-with-velirs-akamai-connector/

[2] http://www.cqblueprints.com/tipsandtricks/cache-flush-service.html

[3] https://docs.adobe.com/docs/en/dispatcher/disp-config.html#Using custom invalidation scripts

3 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

Here is a reply from a Senior AEM Consultant on this:

**************************************************************************************************************

I don’t believe there is anything in the product to perform the cache flush requests for you, however my understanding is that Akamai does have a REST API and you can implement a call to that API from AEM.

Doing a quick search on google you can find a couple of different implementations [1][2] that people have shared.

It should also be possible to write a script that purges the Akamai cache and you can then invoke it from the dispatcher [3].

[1] http://www.velir.com/blog/index.php/2014/07/09/easily-integrate-akamai-into-adobe-cq-aem-with-velirs-akamai-connector/

[2] http://www.cqblueprints.com/tipsandtricks/cache-flush-service.html

[3] https://docs.adobe.com/docs/en/dispatcher/disp-config.html#Using custom invalidation scripts

joerghoh
Adobe Employee
Adobe Employee
October 16, 2015

I addition what Scott wrote:
 

Purging Akamai caches via API calls can take time (minutes, sometimes up to an hour), so it isn't that usable just to purge a page. Instead use a TTL-based approach on Akamai. For example, when you allow Akamai to cache files for 10 minutes (using the regular cache headers), Akamai will fetch the files from its origin (your servers) every 10 minutes. This results in a maximum of 10 minutes until your new content gets visible via Akamai.

That's what I would recommend.

kind regards,
Jörg

October 17, 2019

In case anyone is looking for Java code to purge Akamai cache, you can refer below:

https://www.linkedin.com/pulse/akamai-cache-purge-aem-through-java-code-shubham-saxena/

Regards

Shubham

Level 2
February 11, 2021

Hi Shubham,

In the above link contains only implementation class. can you provide the all class file related to this article. i am facing some issues in config class also.