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
Spring caching does not currently work as I would expect for methods that return a Mono type. I suggest an enhancement to support the caching of the value emitted from the mono as opposed to the mono itself.
E.g.
@Cacheable(...)
public Mono<> expensiveOperation(...)
It should work in the same way as for any other cacheable except targeting the emitted value rather than the actual mono. In particular it should support custom keys, cache managers, etc.
We have a rough implementation that we are using at Booking.com. I’d be happy to contribute to this if it is accepted.
The text was updated successfully, but these errors were encountered:
Btw, I have searched stack overflow. Although there are alternative solutions such as reactor’s CacheMono, these require more code and are not as natural for people already familiar with spring caching.
Spring caching does not currently work as I would expect for methods that return a Mono type. I suggest an enhancement to support the caching of the value emitted from the mono as opposed to the mono itself.
E.g.
@Cacheable(...)
public Mono<> expensiveOperation(...)
It should work in the same way as for any other cacheable except targeting the emitted value rather than the actual mono. In particular it should support custom keys, cache managers, etc.
We have a rough implementation that we are using at Booking.com. I’d be happy to contribute to this if it is accepted.
The text was updated successfully, but these errors were encountered: