I am trying to get value of a key in redis cluster using redisson client .
Config config = new Config(); config.useClusterServers() .addNodeAddress("redis://localhost:6380","redis://localhost:6379","redis://localhost:6381"); RedissonClient redisson = Redisson.create(config); RMapCache<String, String> map = redisson.getMapCache("db0"); System.out.println("Key value is : "+map.get("key"));
I have got db0 as keyspace from this command result
INFO keyspace
db0:keys=1,expires=0,avg_ttl=0
but the result is :
Key value is : null