benluteijn / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

[Feature Request] Key info #101

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be cool to be able to see info about a key. For example, create
time, last access time, expiry time, etc.

Original issue reported on code.google.com by gwebmast...@yahoo.com on 17 Nov 2009 at 7:19

GoogleCodeExporter commented 9 years ago
I looked at the code and I don't think create time and access time are 
currently stored. There might 
be some overhead there (space-wise and time-wise to make the system call).

For getting the expiration time of a key, the existing ttl command will show 
you how many seconds a 
key has left to live:

dbravender@dbravender-laptop:~/oprojects/redis$ telnet localhost 6379
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
set x 1
a
+OK
expire x 100
:1
ttl x
:98

Original comment by dan.brav...@gmail.com on 25 Dec 2009 at 4:35

GoogleCodeExporter commented 9 years ago

Original comment by anti...@gmail.com on 23 Aug 2010 at 3:44