venugopal
venugopal

Reputation: 273

Need to know basic knowledge on redis

I'm new to redis, have doubt on below commands

In redis-cli i have entered info keyspace, for this i got the following output

# Keyspace
db0:keys=2,expires=0,avg_ttl=0

What does the above lines represent. N how to get the value from key.

Upvotes: 0

Views: 276

Answers (1)

Shashank Shekhar
Shashank Shekhar

Reputation: 41

You might want to look at https://redis.io/commands/INFO To be specific the keyspace is, as mention in the official doc:

Database related statistics

The keyspace section provides statistics on the main dictionary of each database. The statistics are the number of keys, and the number of keys with an expiration.

For each database, the following line is added:

dbXXX: keys=XXX,expires=XXX

So in your case you have 2 keys present in redis

Upvotes: 1

Related Questions