It is simple if you have worked on Spring Cache. However I am open to someone who is learning but can commit to deliver the project fast.
Please read the problem below :
Currently I have a Map<Integer, List<String>> . The code runs like once a day. I want to use Java Spring Cache instead of this map. If the data is not found in cache, it should compare with the database. The LRU data should expire in favor of most recently used one.
You should also write the code for updating the cache when some new data is added to the DB and the next day the code runs, it should update the cache.
DB Example :
0 | “ABC”
1 | “ASD”
1 | “DEF”
2 | “AZX”
0 , <ABC>
1, <ASD, DEF>
Next day, the row 2 | “AHH” is added.
The cache should be updated with
2, <AZX, AHH>
Apart from LRU, I don't want the data to be expired on time basis.
I do not want Spring Data JPA, I would want the read/writes in the data by SQL Queries.