TYPE
Syntax
TYPE key
- Available since:
- Redis Open Source 1.0.0
- Time complexity:
- O(1)
- ACL categories:
-
@keyspace,@read,@fast, - Compatibility:
- Redis Enterprise and Redis Cloud compatibility
Returns the string representation of the type of the value stored at key.
The different types that can be returned are: string, list, set, zset,
hash, stream, and vectorset.
Examples
Redis Enterprise and Redis Cloud compatibility
| Redis Enterprise |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard |
✅ Standard |
Return information
Simple string reply: the type of key, or
none when key doesn't exist.