How can you get Redis to display all of it's current keys along side the last time they were accessed? Ideally in some kind of machine readable form but I'll take what I can get.
Asked
Active
Viewed 3,295 times
1 Answers
2
If you use the redis-cli command command on the portal, you can use the following method to get all the keys, and then get the last access time one by one.
>SET title "The Hobbit"
OK
>GET title
"The Hobbit"
>KEYS *
KEYS command is unsupported. Sending "SCAN 0 COUNT 1000 MATCH *" instead.
1) "0"
2) 1) "title"
>object idletime title
(integer) 126
If you use code, it is much more convenient, and there are many ways to achieve it.
You can refer below post.

Jason Pan
- 15,263
- 1
- 14
- 29