I am using Spring Boot for my application. Using @EnableCaching
annotation at application level.
Consider I have multiple cache names like below in some methods on the application
@Cacheable(value = "cache1")
@Cacheable(value = "cache2")
@Cacheable(value = "cache3")
@Cacheable(value = "cache4")
@Cacheable(value = "cache5")
My aim to cache only cache1 for now. So defined following in application.properties
spring.cache.cache-names=cache1
spring.cache.caffeine.spec=maximumSize=100,expireAfterAccess=300s
But when I use the application, I get error like below as it can't find "cache2"
Cannot find cache named 'cache2' for Builder....
I have used multiple cache names in the application. Currently I want to use only cache1 for now. Is it possible to say support only these cache names via some property? How to accomplish it?