Caching dependencies
The most common flow in the Football Trading application that we want to optimize is the following: sometimes, the users buy some cards, and after using them in their albums, they try to exchange the redundant cards they already have with other users. Before starting the exchange process, the users see which players are available from other users. There can be thousands and even millions of cards, but the total number of football players is around 700, and they are constantly retrieved from the Football Trading application.
Now, you want to optimize the application’s performance. So, you are considering using a cache mechanism to avoid retrieving data from the database that is accessed frequently but changes very infrequently.
In this recipe, you will learn how to identify a database bottleneck and how to apply the caching mechanisms provided by Spring Boot. You will learn how to measure the improvement using the observability tools you learned about...