Quantcast
Channel: Active questions tagged redis+ruby-on-rails - Stack Overflow
Viewing all articles
Browse latest Browse all 873

Handle Duplicate API calls gracefully in Rails

$
0
0

I know this question has been asked multiple number of times in the past. However, my situation is a bit unique. The problem I am facing is the UI is making 5-10 requests for a single button click in a span for few milliseconds (There are 10 events fired in a 5 milliseconds in some cases) and the Rails API calls are being processed in separate parallel threads. How can we hand the duplicates in this case? The options I explored are to place a Unique key in Redis and refer to the same on every API call and see if this has already been processed.


Viewing all articles
Browse latest Browse all 873

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>