Avoid CacheAspectSupport#findInCaches fall through to reactive handler
Prior to this commit if the return type is a CompletableFuture but a cache get returns null, the execution falls through to the reactiveCachingHandler. This commit ensures that evaluation instead continues onto the next cache (if any). Closes gh-33371
This commit is contained in:
@@ -510,6 +510,9 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
|
||||
(value != null ? CompletableFuture.completedFuture(unwrapCacheValue(value)) : null),
|
||||
invoker, method, contexts));
|
||||
}
|
||||
else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (this.reactiveCachingHandler != null) {
|
||||
Object returnValue = this.reactiveCachingHandler.findInCaches(
|
||||
|
||||
Reference in New Issue
Block a user