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
Build a Rest API which would read Sql Table and write on Redis
Cons: would require manual intervention
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