Posts

Showing posts from June, 2020

AEM integration with Akamai Fast Purge API for Single/multiple urls

Image
In AEM we can clear dispatcher cache on page activation by adding dispatcher flush agent but if we have Akamai on top of dispatcher as CDN then we need to manually clear Akamai Cache by going to akamai console. Akamai provides fast purge API and using that we can clear page cache using single URL, CPCode, multiple urls etc We can integrate Akamai Fast Purge API with replication agent so that for every page activation akamai cache gets cleared. To integrate with Akamai Fast Purge we need below details (Contact Akamai for details related to your account) 1) Access Token 2) Client Secret 3) Client Token 4) Akamai Host API End Points ( https://developer.akamai.com/api/core_features/fast_purge/v3.html ) Once above details are gathered you can refer below code for multiple urls cache clear Create a map with array list of urls  Map<String, List<String>> akamaiRequestMap = Maps.newHashMap(); ArrayList<String> arrayList = new ArrayList<>(); arrayList.add("Ad