This demo project uses the following technologies
- SpringBoot
- EH Cache (For Caching- Uses a simple key and Object. Can extend this to auto evict, store to disk etc)
- Lombok (To remove boilerplate code)
- Spring H2 DB (Simple In-Memory DB)
- Spring Data (Access the DB via CRUD class)
Clone this project and run the Boot class.
Access it via, http://localhost:8080/products/2 Notice the time taken by the method
Access again http://localhost:8080/products/2 Now notice the time taken by the method.
To view the contents of the cache, use - http://localhost:8080/cache/viewProductCache