Relative Content

Tag Archive for javaspring-bootcaching

Spring Boot Cacheable: At least one non empty cache name is required per cache operation

I want to cache the service get method results only when the number of selected results is less than 50. I have already configured the Entity Manager Factory’s properties.setProperty("javax.persistence.shared-cache.mode", "ENABLE_SELECTIVE"), and as you can see I set the javax persistence’s Cacheable to true so that it caches the entity’s queries. Then I tried to configure the cache at the service retrieval method level, but IntelliJ shows me a squiggle warning.