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
Revisit storage of null attributes in AbstractFallbackTransaction/CacheAttributeSource [SPR-15513] #20072
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.
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.
Activity
jhoeller commentedon Mar 4, 2024
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/CacheAttributemethods 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
isCandidateClasssupport onJCacheOperationSourcenow which was previously missing there next to the existing support on the other fallback source classes.Enable efficient pointcut checks for composite sources as well