We decide to use cache (not decide specific cache) , but today came to know that we need to invalidate the cache data or refresh the cache data for every 2 minutes by connecting to datastore , but i am thinking that 2 min is not feasible , because if you keep on refresh the cache data for every 2 min , then it is better to connect to the data store itself , so can anyone please suggest what is feasible time interval , we can set to invalidate the cache of old date and refresh the cache with data from data store ?
Note : we are using spring boot , postgres