Redis Cheat Sheet
Redis Cheat Sheet
1. Basics
redis-server
redis-cli
2. Data Types
2.1. Strings
2.2. Lists
2.3. Sets
2.4. Hashes
4. Pub/Sub (Publish/Subscribe)
SUBSCRIBE channel
5. Transactions
MULTI
EXEC
6. Configuration
7. Server
INFO
MONITOR
# Rename a key
RENAME key new_key
9.4. Scripting
9.5. Replication
# Set up a slave
SLAVEOF master_ip master_port
# Restore a backup
BGSAVE
9.9. Security
# Set a password
CONFIG SET requirepass password
9.10. Monitoring
9.11. Persistence
Here is a quick reference Redis cheat sheet compiled by @code.clash. It provides examples of Redis commands for easy reference. For more in-depth
information and advanced usage, be sure to check out the official Redis documentation.
Happy coding!