OBJECT-IDLETIME(3valkey)
π OBJECT-IDLETIME β ok bestie, let's find out how long this key's been sitting there unbothered π
so this is a page from the Valkey Command Manual, section 3valkey, and it's all about OBJECT IDLETIME, which tells you how long it's been since anybody touched a key. literally the "how long have you been rotting in bed" check but for your data. πβ¨
β¨ NAME β¨
object-idletime β returns the time since the last access to an object. that's it, that's the whole job, and she does it flawlessly. π
πΈ SYNOPSIS πΈ
OBJECT IDLETIME key
π¦ DESCRIPTION π¦
This command returns the time in seconds since the last access to the value stored at key. like, "girl how long has it been since someone checked on you" energy. β°
π¨ IMPORTANT BESTIE, READ THIS TWICE: the command is only available when themaxmemory-policyconfiguration directive is not set to one of the LFU policies. so if you're running LFU, this command is simply not it and you needOBJECT FREQinstead. no cap. π«Ά
π REPLY π
π RESP2
One of the following:
valkey-protocol(7)Integer reply: the idle time in seconds.valkey-protocol(7)Nil reply: ifkeydoesn't exist. π
π RESP3
One of the following:
valkey-protocol(7)Integer reply: the idle time in seconds.valkey-protocol(7)Null reply: ifkeydoesn't exist. π
(yeah the only difference is Nil vs Null, the protocol glow-up is real, don't @ me) π
β‘ COMPLEXITY β‘
O(1) β constant time, instant, zero effort, main character efficiency. she ate and left no crumbs. π₯
π ACL CATEGORIES π
@keyspace@read@slow
π HISTORY π
- Available since: 2.2.3 β an icon since day one, honestly. β
π«Ά SEE ALSO π«Ά
ok so if you liked this one, here's the whole friend group, go say hi:
copy(3valkey)del(3valkey)dump(3valkey)exists(3valkey)expire(3valkey)expireat(3valkey)expiretime(3valkey)keys(3valkey)migrate(3valkey)move(3valkey)object(3valkey)object-encoding(3valkey)object-freq(3valkey)object-help(3valkey)object-refcount(3valkey)persist(3valkey)pexpire(3valkey)pexpireat(3valkey)pexpiretime(3valkey)pttl(3valkey)randomkey(3valkey)rename(3valkey)renamenx(3valkey)restore(3valkey)scan(3valkey)sort(3valkey)sort_ro(3valkey)touch(3valkey)ttl(3valkey)type(3valkey)unlink(3valkey)wait(3valkey)waitaof(3valkey)
and that's the whole page bestie, you're officially fluent π this was version 9.0.0, dated 2025-10-21, brought to you by the Valkey Command Manual gang. go check on your keys, they miss you. πβ¨π¦
π¦ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms