link

Redis

Redis commands for managing key-value stores, caching, and pub/sub messaging

35 commands

Commands

35 commands available
Resources

Master Redis

Become proficient in key-value store

redis

Set Key Value

Set string value

SET key value
string
basic
redis

Get Key Value

Get string value

GET key
string
basic
redis

Increment Value

Increment integer value

INCR key
string
counter
redis

Set Hash Field

Set field in hash

HSET key field value
hash
data-structure
redis

Get Hash Field

Get field from hash

HGET key field
hash
data-structure
redis

Get All Hash Fields

Get all fields and values

HGETALL key
hash
data-structure
redis

List Push Left

Prepend to list

LPUSH key element
list
data-structure
redis

List Push Right

Append to list

RPUSH key element
list
data-structure
redis

List Range

Get list elements

LRANGE key start stop
list
data-structure
redis

Set Add

Add members to set

SADD key member
set
data-structure
redis

Set Members

Get all members

SMEMBERS key
set
data-structure
redis

Set Intersection

Find common members

SINTER key1 key2
set
data-structure
redis

Sorted Set Add

Add members with scores

ZADD key score member
sorted-set
data-structure
redis

Sorted Set Range

Get members by range

ZRANGE key start stop
sorted-set
data-structure
redis

Set Expiration

Set key timeout

EXPIRE key seconds
expiration
management
redis

Time To Live

Get expiration time

TTL key
expiration
management
redis

Publish Message

Send to channel

PUBLISH channel message
pubsub
messaging
redis

Subscribe to Channel

Listen for messages

SUBSCRIBE channel
pubsub
messaging
redis

Start Transaction

Begin command block

MULTI
transaction
atomic
redis

Execute Transaction

Run queued commands

EXEC
transaction
atomic
redis

Flush All Data

Delete all keys

FLUSHALL
management
dangerous
redis

Server Information

Get server stats

INFO
management
monitoring
redis

Get Configuration

Read server config

CONFIG GET parameter
management
configuration
redis

Save Database

Synchronous save

SAVE
persistence
backup
redis

Background Save

Asynchronous save

BGSAVE
persistence
backup
redis

Add Geospatial Item

Store geographic points

GEOADD key longitude latitude member
geospatial
advanced
redis

Geospatial Distance

Calculate distance

GEODIST key member1 member2
geospatial
advanced
redis

HyperLogLog Add

Estimate unique values

PFADD key element
hyperloglog
probabilistic
redis

HyperLogLog Count

Estimate cardinality

PFCOUNT key
hyperloglog
probabilistic
redis

Stream Add

Append to stream

XADD key ID field value
stream
messaging
redis

Stream Read

Read from streams

XREAD COUNT n STREAMS key ID
stream
messaging
redis

Cluster Information

Get cluster status

CLUSTER INFO
cluster
management
redis

Cluster Nodes

List cluster nodes

CLUSTER NODES
cluster
management
redis

Authenticate

Password authentication

AUTH password
security
authentication
redis

Access Control

Manage permissions

ACL ...
security
acl