Evaluate @Cacheable(condition) once per method invocation only [SPR-17024] #21562
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
George Georgovassilis opened SPR-17024 and commented
Cacheable(condition) is evaluated twice for every invocation on the proxied object. For a failing test see https://github.com/ggeorgovassilis/spring-cache-double-condition-evaluation/tree/master
This is a potential performance bottleneck as conditions may delegate to objects which query a database or perform costly cryptographic operations.
Affects: 5.0.7
Reference URL: https://github.com/ggeorgovassilis/spring-cache-double-condition-evaluation/tree/master
Referenced from: commits faef363
The text was updated successfully, but these errors were encountered: