Spring Boot Cache Implementation for Database Operations

Cache implementation was done using built-in cache function on spring boot framework.

First, you need to add the following maven dependency:

To enable caching, add @EnableCaching annotation on any configuration class, for example the main class (in this case the DemoApplication class).