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

Load data from relational table to Redis [closed]

$
0
0

I have a relational table bearing key value pairs. I expect to keep these at REDIS for faster fetch while using at my code.

Project tech Stack: Java, SpringBoot, REST

What would be the best approach for doing this?Some which I could brainstorm are

  1. Build a Rest API which would read Sql Table and write on Redis

    Cons: would require manual intervention

  2. At onApplicationLoad Event, push the values on Redis

    Cons: This would happen on every deployment

Please suggest me the best approach

Sql Table

id key  val 1  xxx   1002  yyy   200 3  zzz   300 

Expected Redis State

redis:6379> MGET xxx yyy zzz1) 1002) 2003) 300 

Viewing all articles
Browse latest Browse all 2204

Trending Articles



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