OBJECT idletime

Apply for Redis Developer Course Redis Regular Inspection / Technical Support Redis Enterprise Server

Get the time since the key was last referenced

Usage is OBJECT idletime key.
You can find keys that have not been used for a long time.

Example

Command>set key Hello
Result>OK
Command>object idletime key
Result>5
Command>append key Redis
Result>10
Command>object idletime key
Result>3
Command>get key
Result>HelloRedis
Command>object idletime key
Result>3


Syntax

OBJECT idletime key

  • Available since version 2.2.3.
  • Time complexity is O(1)
Related commands

<< OBJECT encoding OBJECT idletime OBJECT refcount >>

Email 답글이 올라오면 이메일로 알려드리겠습니다.