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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How can I measure average waiting time as nodes increase efficiently?

Level 4
Level 4

Hello Everyone,

I have implemented the logic for dispatcher on Apache Server programatically.

My logic for dispatcher is like below one.

-Step01 : Delete old cache.

-Step02 : Create new cache.

But I found serious issue when I tested cache on dispatcher.

New cache was always deleted because creating new cache was faster than deleting old cache.

So I had to add 1 second for waiting time before new cache was created like below one.

boolean deleted = DispatcherUtil.invokeToDeleteCache(resolver, replicationAction.getPaths(), ReplicationActionType.DELETE);

              if (deleted) {

                   try {

                              TimeUnit.SECONDS.sleep(1); // wait 1 second

                    } catch (InterruptedException e) {

                                log.error(e.getMessage(), e);


                    DispatcherUtil.invokeToCreateCache(resolver, replicationAction.getPaths());


After I added 1 second for waiting time, new cache has created successfully.

So I wonder what the average waiting time is as nodes increase like below picture.


How can I measure average waiting time as nodes increase efficiently?


Chung Yong.

2 Replies
Level 10
Level 10

I am not that there can be a formula that will work for all instances. I am sure there will be different factors. Having said that - lets see what other AEM community members have to say about this.



may I ask the question what your goal is? I never saw a requirement to write code to invalidate the dispatcher cache. Also I am not familiar with the terms "old cache" and "new cache" regarding dispatcher. Can you elaborate your usecase in more detail?