-
Notifications
You must be signed in to change notification settings - Fork 82
Description
Motivation
CacheMono and CacheFlux helpers were an attempt at providing a sane solution to adapt various cache / means of caching into a reactive facade.
There is very little bandwidth to maintain it, and it seems it is not entirely helpful. Maybe even going as far as causing more problems than it solves.
See for example #162, #181, #201 (and recently closed #234...)
When using a caching solution like https://github.com/ben-manes/caffeine that has a future-based async API, we can recommend to just wrap the futures using Mono#toFuture() and Mono.fromFuture(f).
For other use cases for CacheFlux I could find in the wild the path would be a bit more ambiguous.
A few relevant projects that build up on CacheFlux/CacheMono I could find in github include:
- https://github.com/deeperunderstanding/reactive-cache-poc (backed by Redis)
- https://github.com/Odysseymoon/spring-webflux-template
- https://github.com/alex-pumpkin/reactor-lock
- https://github.com/rezaarshad/Spring-Webflux-Cache (sample to do reactive caching on top of GuaveCache)
- https://github.com/pkgonan/reactor-cache (support
@EnableCachingspring annotation backed byCacheMono) - https://github.com/hotire/reactor-utils/ has a
ReactiveCacheManagerwrapping spring'sCacheandCacheManager - https://github.com/making/functional-spring-cookbook has an entry on using
CacheMonowith a map and caffeine - https://github.com/mmaggioni/reactive-cache seems to be a spring-webflux oriented solution providing an annotation on top of
CacheMono - https://github.com/spring-cloud/spring-cloud-gateway/ uses
CacheFluxin theCachingRouteLocator(backed by aConcurrentHashMap)
Desired solution
One of the following outcomes:
- gather feedback indicating that although it has shortcomings (eg. cache stampeding), it is useful for usecases that are not too advanced and should be kept as is, in low maintenance mode
- get a community member to step up and spin
CacheFlux/CacheMonointo a separate community-supported project, deprecatereactor.cacheclasses in favor of said community project - gather feedback that the drawbacks of
CacheFlux/CacheMonoovercome the benefits, deprecatereactor.cacheclasses for future removal
pinging the owners of the above projects for feedback:
@deeperunderstanding, @Odysseymoon, @alex-pumpkin, @rezaarshad, @pkgonan, @Hothire, @making, @mmaggioni, @spencergibb.
also pinging users that contributed to discussions in the above issues:
@dave-fl, @cybuch, @wer-mathurin, @ben-manes, @hmble2, @dannyjiang001