Back to Redis

OBJECT FREQ

content/commands/object-freq.md

latest1.2 KB
Original Source

This command returns the logarithmic access frequency counter of a Redis object stored at <key>.

The command is only available when the maxmemory-policy configuration directive is set to one of the LFU policies.

Redis Software and Redis Cloud compatibility

| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | |

Return information

{{< multitabs id="object-freq-return-info" tab1="RESP2" tab2="RESP3" >}}

One of the following: Integer reply: the counter's value. Nil reply: if key doesn't exist.

-tab-sep-

One of the following: Integer reply: the counter's value. Null reply: if key doesn't exist.

{{< /multitabs >}}