Caching is a common practice to improve your system in many ways. It helps to make your system resilient, scalable, fast, and even save some bucks depending on your use case.

If in your database some values are read often then it’s a good idea to cache them. This could be the content of the email that you send to a newly registered user, a catchy banner text that changes every day or the number of hours you ban a user from your system for suspicious activity.

If these are accessed too frequently, you may store them in application properties or even in your code, but then you have to redeploy to make the change effective. These are the type of things which are most likely set by the business team, so if they decide to change something it is an overkill to deploy the application. So you better give them a portal to update these and inside your application you both store them in database and cache such as redis as well.

#redis #caching #cacheable #java #spring #caching made easy in spring boot

Caching made easy in Spring Boot
1.65 GEEK