Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM 6.4 - Programatic flush request

Avatar

Avatar
Boost 5
Level 2
qglez
Level 2

Likes

7 likes

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Boost 5
Level 2
qglez
Level 2

Likes

7 likes

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
qglez
Level 2

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

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

17-08-2018

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,198 likes

Total Posts

6,369 posts

Correct Reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,198 likes

Total Posts

6,369 posts

Correct Reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
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

Avatar

Avatar
Boost 5
Level 2
qglez
Level 2

Likes

7 likes

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Boost 5
Level 2
qglez
Level 2

Likes

7 likes

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
qglez
Level 2

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.

Avatar

Avatar
Give Back
Level 1
sudhakars10
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Give Back
View profile

Avatar
Give Back
Level 1
sudhakars10
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Give Back
View profile
sudhakars10
Level 1

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 ?