I have a requirement to cache some static data as it is being consumed by our system. There is a static API that gives a map of records and we are fetching the corresponding record based on request.
Instead of calling the static API for every request, we are planning on caching the data in an in-memory Java cache that spring boot provides an calling the API only if the key is missing.
Cache implementation can be any one of these, https://docs.spring.io/spring-boot/docs/2.0.x/reference/html/boot-features-caching.html#boot-features-caching-provider.
We have multiple containers deployed for our application and the pods can go down to create new ones taking down the cache with it. What I'm wondering is if using a Spring Boot cache a good choice here or is it better to go with some central caching service like redis?