Redis
In-memory data store commands for caching, pub/sub messaging, streams, and key-value operations.
71 commands
Browse by Topic
Getting Started
Quick setup and installation
Strings
String operations
Hashes
Hash operations
Lists
List operations
Sets
Set operations
Streams
Stream operations
Pub/Sub
Publish/Subscribe
Server
Server commands
JSON
RedisJSON module
Search
RedisSearch FT commands
Run Redis with Docker
Start Redis server in a Docker container on port 6379
Connect to Redis CLI
Open interactive Redis CLI in the running container
Test Redis connection
Send PING to verify Redis server is responding (returns PONG)
Append to string
Append value to existing string
Decrement value
Decrement integer value by 1
Get key value
Get string value of a key
Increment value
Increment integer value by 1
Increment by amount
Increment integer value by specific amount
Get multiple keys
Get values of multiple keys
Set multiple keys
Set multiple key-value pairs atomically
Set key value
Set string value for a key
Set with expiry (seconds)
Set value with expiration in seconds
Set if not exists
Set value only if key doesn't exist
Delete hash field
Delete field from hash
Check field exists
Check if field exists in hash
Get hash field
Get value of hash field
Get all hash fields
Get all fields and values in hash
Increment hash field
Increment hash field by integer
Get multiple hash fields
Get values of multiple hash fields
Set multiple hash fields
Set multiple fields in hash
Set hash field
Set field in hash
Blocking pop from head
Pop from head or block until available
Get element by index
Get element at specific index
Get list length
Get number of elements in list
Pop from list head
Remove and return first element
Push to list head
Insert value at beginning of list
Get list range
Get all elements in list (0 to -1 = all)
Pop from list tail
Remove and return last element
Push to list tail
Insert value at end of list
Add to set
Add member to set
Get set size
Get number of members in set
Difference of sets
Get difference between sets
Intersection of sets
Get intersection of multiple sets
Check set membership
Check if member exists in set
Get all set members
Get all members of set
Remove from set
Remove member from set
Union of sets
Get union of multiple sets
Add to stream
Add entry to stream with auto-generated ID
Claim abandoned messages
Automatically claim pending messages from other consumers
Create consumer group
Create consumer group for stream
Reset consumer group
Reset consumer group position to start or specific entry
Detailed stream info
Get comprehensive stream information including entries and groups
Get stream length
Get number of entries in stream
View pending messages
Get detailed information about pending messages in consumer group
Get stream range
Get all entries in stream
Read from stream
Read entries from stream
Read as consumer
Read stream entries as consumer group member
Pattern subscribe
Subscribe to channels matching pattern
Publish message
Publish message to channel
Subscribe to channel
Subscribe to channel for messages
Unsubscribe from channel
Unsubscribe from channel
Connect to Redis
Connect to Redis server with authentication
Database size
Get number of keys in current database
Delete key
Delete one or more keys
Check key exists
Check if key exists
Set key expiry
Set expiration time on key
Flush all databases
Delete all keys in all databases
Flush current database
Delete all keys in current database
Server info
Get server information and statistics
Find keys by pattern
Find keys matching pattern (use SCAN in production)
Ping server
Test if server is responding
Scan keys (safe)
Iterate keys safely (non-blocking)
Select database
Switch to different database (0-15)
Get time to live
Get remaining time to live of key
Get key type
Get the type of value stored at key
Get JSON document
Get entire JSON document or specific path
Get field from multiple docs
Get specific field from multiple JSON documents
Set JSON document
Set JSON document at path using JSONPath syntax
Aggregation query
Run aggregation queries with grouping and transformations
Create search index
Create full-text search index on hash with schema definition
Full-text search
Execute full-text search with pagination support
Discussion
Loading comments...