redisTemplate.opsForHash().put("key", "field", cacheValue).flatMap(resBoolean -> {return resBoolean;}).onErrorResume(e -> {return Mono.just(false);});
Only when I first call the above method with a new key, the value is stored in Redis. When I call the same method second time with the same value or different value, I get false back.
Does redis put doesn’t overwrite the value for the same key ? Is it because, each value stored for the key is immutable ?
If I remove the cache value, I was able to set the value again which is obvious. Pleas help answer.
New contributor
fony ding is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.