OBJECT REFCOUNT
OBJECT REFCOUNT key
- Group
- Keys
- Complexity
- O(1)
- Arity
- 3 (exactly, counting the command name)
- HotKV Cloud
- All plans
- On-Premise
- no license needed
OBJECT REFCOUNT exists for compatibility with tools that call it. The reply for an
existing key is always 1.
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| The key exists | Integer 1 |
Integer 1 |
| The key does not exist | Nil bulk string | Null |
Examples
Section titled “Examples”127.0.0.1:6379> SET answer 42OK127.0.0.1:6379> OBJECT REFCOUNT answer(integer) 1127.0.0.1:6379> OBJECT REFCOUNT missing(nil)Compatibility
Section titled “Compatibility”HotKV always replies 1 for an existing key.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.