I'd like to view the time of most recent access for a specific key on my redis server.
I know that this information is stored for each key because it is used in redis's LRU algorithm for eliminating old keys.
Is there an easy way to see this information for a given key?
You can use the OBJECT IDLETIME command for this purpose. It returns the number of seconds since the key was accessed, but If you need the time just subtract the reply from now().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With