How do we handle cache miss scenario using ReactiveRedisTemplate<String, String>? Also, need to log and treat any error from underlying Redis cache as cache miss.
please suggest.
How do we handle cache miss scenario using ReactiveRedisTemplate<String, String>? Also, need to log and treat any error from underlying Redis cache as cache miss.
please suggest.
It's hard to say without a code example, but you can utilize the operator
.switchIfEmpty()
. You'll need to defer the Mono so it's lazy loaded and only evaluated after the Redis template returns something.