我是redis的新手,对下面的命令有疑问
在 redis-cli 中,我输入了信息键空间,为此我得到了以下输出
# Keyspace
db0:keys=2,expires=0,avg_ttl=0
上面几行代表什么。 N 如何从键中获取值。
最佳答案
您可能想看看 https://redis.io/commands/INFO 具体来说,如官方文档中所述,键空间是:
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
所以在你的情况下,你在 redis 中有 2 个键
关于redis - 需要了解redis的基础知识,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51063898/