We have a REST API built using Spring boot. Due to the complexity, the response time quite slow. To improve the performance, we identified set of static info that can be cached instead of going to DB every time.
The way I understand spring cache is, at first run it makes a DB call and then cache the info. When same set of input is given, it returns the result from cache. If the input params are different it goes to the DB again. Please correct me, if my understanding is wrong.
However, we want to cache set of tables (around 10) when server starts and use this info (if available in cache) before trigger a DB call for a given set of input params. Can this be achieved using spring's cache API?