Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

Redis wait for key to be cached in GET request

$
0
0

I have two REST end-points

  1. POST request, this request does some long running task and fills the key-value pair in the cache.
  2. GET request this gets the data from the cache corresponding to a particular key.

Now sometimes Spring-boot server gets the GET request even before the post request has finished processing, so I want some way such that the GET request waits for the key to get cached in the server. If within 1-second the key does not get cached null is returned from the GET end point.

Can anyone please help me with some solution or a way to solve this problem.


Viewing all articles
Browse latest Browse all 2204

Trending Articles



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