OBJECT-FREQ(3valkey)
π OBJECT-FREQ π
okay bestie, welcome to the Valkey Command Manual β this is object-freq(3valkey) and she's here to spill the tea on how obsessed the server is with your key. π«Ά
β¨ NAME β¨
object-freq β Returns the logarithmic access frequency counter of an object.
no cap, that's literally the whole vibe: it tells you how often something's been touched. π
πΈ SYNOPSIS πΈ
OBJECT FREQ key
π¦ DESCRIPTION π¦
So this command returns the logarithmic access frequency counter of a Valkey object stored at key. π
β οΈ okay but listen β this command is only available when the maxmemory-policy configuration directive is set to one of the LFU policies. If you're not running LFU, she simply does not exist for you. sorry babe. π
π REPLY π
RESP2
It's giving one of the following:
valkey-protocol(7)Integer reply: the counter's value. β¨valkey-protocol(7)Nil reply: ifkeydoesn't exist. π
RESP3
Also one of the following, but make it RESP3:
valkey-protocol(7)Integer reply: the counter's value. β¨valkey-protocol(7)Null reply: ifkeydoesn't exist. π
β COMPLEXITY β
constant time, she's fast, she's efficient, main character energy fr fr. π₯
π ACL CATEGORIES π
@keyspace @read @slow
π HISTORY π
- Available since: 4.0.0 β an icon from the beginning, periodt. π
π§ SEE ALSO π§
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-help(3valkey), object-idletime(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)
aaaand that's the whole page bestie, you ate that. πβ¨
Version 9.0.0 Β· dated 2025-10-21 Β· that's the OBJECT-FREQ(3valkey) energy, iykyk π
πΈ
π¦ 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