Spring boot cache not working as expected
I’m trying to use caffeine cache on my springboot 3.1.4 application but it seems it doesn’t work at all
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.