I try to use cache mediator. But when cache dont contain response and I make two same requests, they both throw. But I want the second request wait until first will be cached. How it csn be done in WSO2 ?
1 Answers
1
votes
There are several ways to implements this. First use queue, second use property to mark that request is going on right now.
Second solution is kind of tricky if request will fail, then faulty sequence will start, and need to reset property in that sequence.
Second what does it mean wait for first request? Hold connection and do not respond while first request will not populate cache or just respond quickly "server is too busy" (also legal).