Redis | redis-cli INFO / avg_ttl value

来源:互联网 发布:网络导购员 编辑:程序博客网 时间:2024/06/07 00:40

Redis | redis-cli INFO / avg_ttl value

up vote1down votefavorite

when the command redis-cli INFO is run, some of the returned values indicates the avg_ttl. I'm unsure what unit of time this is represented in:

Example:

Keyspace

db0:keys=706818,expires=228745,avg_ttl=1521990750

shareimprove this question
 

1 Answer

activeoldestvotes
up vote3down voteaccepted

This is a bit confusing indeed.

  • the TTL command return value is in seconds
  • PTTL command return value is in milliseconds
  • avg_ttl from INFO is in milliseconds

Also, note that this average value avg_ttl is just an estimate based on random check of keys.

shareimprove this answer
 
 
what's mean of avg_ttl = 0 ? – Chinaxing Nov 11 '15 at 8:24
0 0
原创粉丝点击