Redis Commands & Data Types Guides
Production reference, command syntax, memory patterns, and common mistakes
Visual Studio and backend developers use Redis for sub-millisecond caching, session storage, real-time metrics, and message queues. Each chapter below provides copy-paste CLI examples, time complexity tradeoffs, and real-world architectural patterns.
Redis Strings
The foundational binary-safe data type for key-value caching, atomic counters, and distributed locks.
Redis Hashes
Field-value maps for storing objects, user profiles, session attributes, and partial-update counters.
Redis Lists
Ordered sequences of strings, ideal for message queues, capped collections, and timeline feeds.
Redis Sets
Unordered collections of unique strings supporting fast membership tests, intersections, and unions.
Redis Sorted Sets (Zsets)
Unique strings ordered by floating-point scores. Essential for real-time leaderboards and rate limiting.
Redis Streams
Append-only log data structures with consumer groups, message acknowledgement, and durable event processing.
Redis Special Types
Advanced probabilistic and specialized primitives: Bitmaps, Bitfields, HyperLogLog, and Geospatial indexes.
Redis Data Structures Overview
Comprehensive decision matrix and memory tradeoff comparison across all primary Redis data models.
Start with Strings for standard key-value caching and whole-blob JSON documents. Switch to Hashes when storing objects with independent fields that need atomic updates without rewriting whole records. Use Lists for queues, Sets for deduplication, and Sorted Sets for scored leaderboards.