Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

How to check null value from REDIS MGET via Jedis client in java

$
0
0

I have some keys in redis. I can do a MGET and fetch the values. But when the key is not present I get a (nil) from redis. But how to check that in java ? I am checking for null but it is not working.

127.0.0.1:6379> MGET key1 key2 key3 key41) "Hello"2) "World"3) "Hi"4) "Hi-World"127.0.0.1:6379> MGET key1 key2 key3 key5 key41) "Hello"2) "World"3) "Hi"4) (nil)5) "Hi-World"127.0.0.1:6379>

Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>