I'm trying to perform a flush request from a custom workflow step.
In order to send the request I'm using the sendFlushUrl method from the FlushService. But when when I do in the error log I get the following message:
com.adobe.cq.social.ugcbase.dispatcher.impl.FlushServiceImpl Worker.run: no agents available - ignoring flush: FlushJob[urlToFlush=/content/xxx/xxx/xxx, refetchUrls=/content/xxx/xxx/xxx]
I had configured the default dispatcher flush agent to point the webserver url.
Does anyone face this problem or know any other way to do it?
Thanks in advance
For testing - have you tried using cURL:
How to send an AEM dispatcher flush request via cURL | Content Management
In order to make the flush service working properly, create flush agents for each dispathcer with following additional settings-
1. Set the Request method - "POST" because this service expects a POST method flush agent.
2. Send additional parameter for "resource only replication"
Also, there are other way to do this. Please have a look at AEM 6.0 and above: Programmatic Cache Invalidation in AEM 6
Hi, sorry for the delayed response
With the cURL call form a terminal it works as expected, not sure why the method described not work.
kautuksahniI review the configuration and it seems to be correct. I've already check the link you posted, that's why I was trying to use the sendFlushUrl from the FlushService.
I finally archive a solution, after a review on the requirements, using the replicator service and a EventListener.
Thank you both for your collaboration.
I am looking for the same solution, Could you please pass the source for Listener and Replicator service in this thread ?