Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

πŸ€– Artificial Intelligence
☁️ Cloud and Infrastructure
πŸ’Ύ Data and Databases
πŸ’Ό Professional Skills
🎯 Programming and Development
πŸ”’ Security and Networking
πŸ“š Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
Β© 2026 CheatGridβ„’. All rights reserved.
Privacy PolicyTerms of UseAboutContact

Redis Cheat Sheet

Redis Cheat Sheet

Back to Databases
Updated 2026-04-27
Next Topic: Relational Databases Cheat Sheet

Redis is an in-memory data structure store used as a database, cache, and message broker. Its key mental model is that every key maps to exactly one data type and commands are valid only for that type. Redis 8 (GA 2025) unified what was previously Redis Stack β€” adding JSON, Time Series, Bloom filters, probabilistic structures, and the new Vector Set type (beta) directly into Redis Open Source. Day-to-day success with Redis comes from choosing the right structure (e.g., sorted sets for leaderboards, streams for event logs, vector sets for semantic search) and using safe key iteration (SCAN) plus explicit expiry (EXPIRE). Treat Redis as a long-running server you secure (ACL/TLS) and observe (INFO, SLOWLOG) rather than "just a library."

What This Cheat Sheet Covers

This topic spans 16 focused tables and 270 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: Setup and IntrospectionTable 2: Keys, TTL, and IterationTable 3: Strings and CountersTable 4: HashesTable 5: Lists and Blocking QueuesTable 6: SetsTable 7: Sorted Sets (ZSET)Table 8: StreamsTable 9: Pub/Sub and NotificationsTable 10: Bitmaps, HyperLogLog, and GeoTable 11: JSON (Redis 8)Table 12: Time Series (Redis 8)Table 13: Probabilistic Structures (Redis 8)Table 14: Vector Sets (Redis 8 β€” Beta)Table 15: Atomicity and ProgrammabilityTable 16: Operations, Security, and Scaling

Table 1: Setup and Introspection

ConceptExampleDescription
redis-cli
redis-cli -h 127.0.0.1 -p 6379
Connects to a Redis server from the command line.
PING
PING
Health check β€” returns PONG if server is reachable.
AUTH
AUTH default myPassword
Authenticates the current connection (username optional for single-password setup).
SELECT
SELECT 1
Switches to a logical database (0–15 by default).
DBSIZE
DBSIZE
Returns number of keys in the currently selected database.
INFO
INFO memory
Returns server stats and state, optionally filtered by section.
CONFIG GET
CONFIG GET maxmemory
Reads effective runtime configuration values.
CONFIG SET
CONFIG SET maxmemory 1073741824
Changes supported runtime configuration without restart.

More in Databases

  • Prisma ORM Cheat Sheet
  • Relational Databases Cheat Sheet
  • Amazon DynamoDB Cheat Sheet
  • Database Design Cheat Sheet
  • Firebase Realtime Database Cheat Sheet
  • NoSQL Data Modeling Patterns Cheat Sheet
View all 42 topics in Databases