Juergen Hoeller opened SPR-15513 and commented
AbstractFallbackTransactionAttributeSource
and AbstractFallbackCacheOperationSource
add a 'null' entry to their attribute cache for every non-annotated method... even for every method of a totally non-annotated class. This is worth improving towards a class-level "not annotated" marker.
Affects: 5.0 RC1
Issue Links:
- #18894 CGLIB proxies should still consider @Transactional
annotations on interface methods
Comment From: jhoeller
As of 6.2, we do not store null attributes during initial introspection at all but rather just on first invocation of a non-transactional method on a proxy (which can only happen if other methods on the same class are transactional/cacheable). This is accomplished through new hasTransaction/CacheAttribute
methods on the SPI which internally indicate no caching in the fallback source classes. As a result, typically only actual transactional/cacheable methods are stored in the cache now, plus potentially some related methods invoked through the same proxies.
For consistency, we also have isCandidateClass
support on JCacheOperationSource
now which was previously missing there next to the existing support on the other fallback source classes.