Redis | redis-cli INFO / avg_ttl value

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
 

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
展开阅读全文

没有更多推荐了,返回首页