Highlighted

AEM 6.4 - Programatic flush request

Avatar

Avatar

qglez

Avatar

qglez

qglez

17-08-2018

Hi

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

Replies

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

17-08-2018

Highlighted

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.6K

Likes

961

Correct Answer

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.6K

Likes

961

Correct Answer

1.1K
kautuk_sahni
Community Manager

21-08-2018

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

-Kautuk

Highlighted

Avatar

Avatar

qglez

Avatar

qglez

qglez

27-08-2018

Hi, sorry for the delayed response

smacdonald2008

With the cURL call form a terminal it works as expected, not sure why the method described not work.

kautuksahni
I 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.

Highlighted

Avatar

Avatar

sudhakars10

Avatar

sudhakars10

sudhakars10

28-04-2019

Hi qglez

I am looking for the same solution, Could you please pass the source for Listener and Replicator service in this thread ?