Files
spring-framework/spring-context/src/main/java/org/springframework
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
..
2024-02-28 19:14:37 +01:00
2024-01-03 14:27:00 +01:00
2024-02-13 14:29:18 +01:00
2023-11-29 10:08:20 +01:00
2024-03-05 18:23:13 +01:00