OBJECT REFCOUNT · Valkey

OBJECT REFCOUNT

Returns the reference count of a value of a key.

Usage

OBJECT REFCOUNT key

Description

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

Reply

One of the following:

Integer: the number of references.

Null: if key doesn’t exist.

Complexity

O(1)

ACL Categories

@keyspace @read @slow

History

See also

COPY, DEL, DUMP, EXISTS, EXPIRE, EXPIREAT, EXPIRETIME, KEYS, MIGRATE, MOVE, OBJECT, OBJECT ENCODING, OBJECT FREQ, OBJECT HELP, OBJECT IDLETIME, PERSIST, PEXPIRE, PEXPIREAT, PEXPIRETIME, PTTL, RANDOMKEY, RENAME, RENAMENX, RESTORE, SCAN, SORT, SORT_RO, TOUCH, TTL, TYPE, UNLINK, WAIT, WAITAOF.