Back to Redis

OBJECT REFCOUNT

content/commands/object-refcount.md

latest1.0 KB
Original Source

This command returns the reference count of the stored at <key>.

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-refcount-return-info" tab1="RESP2" tab2="RESP3" >}}

One of the following: Integer reply: the number of references. Nil reply: if key doesn't exist.

-tab-sep-

One of the following: Integer reply: the number of references. Null reply: if key doesn't exist.

{{< /multitabs >}}