spring-framework/spring-context
Simon Baslé 6d9a2eb9b8 Improve fix of duplicate upstream subscription during reactive cache put
This commit fixes an issue where a Cacheable method which returns a
Flux (or multi-value publisher) will be invoked once, but the returned
publisher is actually subscribed twice.

The previous fix 988f3630c would cause the cached elements to depend on
the first usage pattern / request pattern, which is likely to be too
confusing to users. This fix reintroduces the notion of exhausting the
original Flux by having a second subscriber dedicated to that, but uses
`refCount(2)` to ensure that the original `Flux` returned by the cached
method is still only subscribed once.

Closes gh-32370
2024-03-07 12:08:28 +01:00
..
src Improve fix of duplicate upstream subscription during reactive cache put 2024-03-07 12:08:28 +01:00
.springBeans Rename modules {org.springframework.*=>spring-*} 2012-01-31 14:37:10 +01:00
spring-context.gradle Add basic test for reactive caching 2023-11-20 15:24:40 +01:00