Expand my Community achievements bar.

SOLVED

Flush dispatcher cache programmatically in AEM as cloud Service

Avatar

Level 1

Hi All,

 

I have a requirement to clear dispatcher cache programmatically in AEM as cloud service. What is the best way of doing that?

 

Thanks,

Akhila

 

@arunpatidar @ShaileshBassi @SantoshSai 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
4 Replies

Avatar

Correct answer by
Community Advisor

Avatar

Level 1

Thanks @arunpatidar for sharing this links. I felt using ACS Common flush configuration easy in this scenario. Can we used this for AEM as cloud as well?

I also read about 

com.adobe.cq.social.ugcbase.dispatcher.api.FlushService

Here is the method to flush cache. Here should I create a new user who has access to replicate and pass as userid? Please let me know if you have any information on this.

flushService.sendFlushUrl("userid",
FlushService.FlushType.IMMEDIATE_FLUSH, resourceUrl,
FlushService.RefetchType.IMMEDIATE_REFETCH,
new String[] { resourceUrl });

 

Avatar

Community Advisor

Hi,

I think you can use it, If it was deprecated in AEMaaCS, the document must have mentioned that.

I am not sure about using , because this is related to AEM Community sites

com.adobe.cq.social.ugcbase.dispatcher.api.FlushService

 If you want, you can create your own service which ideally contains flush post requests or use make a flush call by using existing flush agent in your code.



Arun Patidar

Avatar

Level 2

Hi @Akhila - Could you please confirm whether you are able to clear cache in AEM cloud using

 

com.adobe.cq.social.ugcbase.dispatcher.api.FlushService