Redis Data Structures
Use strings, hashes, lists, sets, streams, and pub/sub through your Redis client. Choose the structure by what your application needs to do.
| Application need | Guide |
|---|---|
| Cached values and expirations | Keys and values |
| Ordered items and simple queues | Lists |
| Structured documents and updates by path | JSON documents |
| Related fields | Hashes |
| Membership, rankings, and scores | Sets and sorted sets |
| Events with consumer acknowledgements | Streams |
| Notifications to connected clients | Pub/sub |
| Compact flags, estimates, locations, and scripts | Other structures and scripting |
For decisions spanning multiple commands or keys, use SSI transactions to read results and branch in application code before committing. Lua is not required.
Check compatibility and the command reference for supported operations and limits.