You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@Cacheable not working on interface method in Spring Boot 1.4.2+ #8331
@Cacheable(cacheManager = "cacheManager", value = "cache-test", key = "'test-key2'")
This used to work well till Spring Boot 1.4.1 and the interface methods are annotated, since after upgrading to Spring Boot 1.4.3 & also tried the same on 1.4.4 the interface annotated methods have stopped working.
After digging deeper, we found it stops working with Spring Data JPA
changed the title [-]@Cacheable not working on interface in Spring Boot 1.4.3+[/-][+]@Cacheable not working on interface method in Spring Boot 1.4.3+[/+]on Feb 20, 2017
changed the title [-]@Cacheable not working on interface method in Spring Boot 1.4.3+[/-][+]@Cacheable not working on interface method in Spring Boot 1.4.2+[/+]on Feb 20, 2017
The mix between annotations on interface and concrete classes is not something we recommend doing but I can confirm that adding the JPA starter is enough to trigger the problem. It works with Spring Boot 1.4.1..RELEASE (Spring Framework 4.3.3.RELEASE) and does not anymore as of 1.4.2.RELEASE (Spring Framework 4.3.4.RELEASE).
If I upgrade the spring framework version to use with 1.4.1.RELEASE with 4.3.4.RELEASE I am able to reproduce the problem. This looks like a framework regression but I have no idea why data jpa is triggering it.
After further investigation, this has been confirmed as a regression in Spring Framework, watch SPR-15271 for updates. I am closing this one in favour of #8248
Activity
[-]@Cacheable not working on interface in Spring Boot 1.4.3+[/-][+]@Cacheable not working on interface method in Spring Boot 1.4.3+[/+][-]@Cacheable not working on interface method in Spring Boot 1.4.3+[/-][+]@Cacheable not working on interface method in Spring Boot 1.4.2+[/+]snicoll commentedon Feb 20, 2017
Thanks for the sample but I've built something that is more reasonable based on yours (you really do not need a redis store to reproduce this issue!)
https://github.com/snicoll-scratches/test-cache-interface
The mix between annotations on interface and concrete classes is not something we recommend doing but I can confirm that adding the JPA starter is enough to trigger the problem. It works with Spring Boot
1.4.1..RELEASE(Spring Framework4.3.3.RELEASE) and does not anymore as of1.4.2.RELEASE(Spring Framework4.3.4.RELEASE).If I upgrade the spring framework version to use with
1.4.1.RELEASEwith4.3.4.RELEASEI am able to reproduce the problem. This looks like a framework regression but I have no idea why data jpa is triggering it.ahmednasir91 commentedon Feb 20, 2017
Thanks @snicoll
We are using
@Cacheableon interfaces only, just for sample i added to both interfaces & concrete class.snicoll commentedon Feb 20, 2017
Ah that makes sense, thanks for clarifying.
snicoll commentedon Feb 20, 2017
After further investigation, this has been confirmed as a regression in Spring Framework, watch SPR-15271 for updates. I am closing this one in favour of #8248
rcollette commentedon Nov 16, 2018