section
qa
answer
Strings
APPEND
Append
Strings
BITCOUNT
Count set bits
Strings
BITOP
Bitwise operations
Strings
BITPOS
Find first set bit
Strings
DECR
Decrement integer
Strings
DECRBY
Subtract from integer
Strings
GET
Get by key
Strings
GETBIT
Get bit by index
Strings
GETRANGE
Get substring
Strings
GETSET
Set, returning old value
Strings
INCR
Increment integer
Strings
INCRBY
Add to integer
Strings
INCRBYFLOAT
Add to float
Strings
MGET
Get multiple
Strings
MSET
Set multiple
Strings
MSETNX
Set multiple if don't exist
Strings
PSETEX
Set with expiry (ms)
Strings
SET
Set
Strings
SETBIT
Set bit by index
Strings
SETEX
Set with expiry (seconds)
Strings
SETNX
Set if doesn't exist
Strings
SETRANGE
Set substring
Strings
STRLEN
Get length
Lists
BLPOP
Blocking left pop
Lists
BRPOP
Blocking right pop
Lists
BRPOPLPUSH
Blocking rotate
Lists
LINDEX
Access by index
Lists
LINSERT
Insert next to
Lists
LLEN
Get length
Lists
LPOP
Pop from start Lists (cont)
Lists
LPUSH
Push onto start
Lists
LPUSHX
Push if list exists
Lists
LRANGE
Access range
Lists
LREM
Remove
Lists
LSET
Set item by index
Lists
LTRIM
Remove start and/or end tems
Lists
RPOP
Pop from end
Lists
RPOPLPUSH
Rotate
Lists
RPUSH
Push onto end
Lists
RPUSHX
Push onto end if list exists Client/Server
Lists
AUTH
Request authentication
Lists
ECHO
Return message
Lists
PING
Test connection
Lists
QUIT
Close connection
Lists
SELECT
Set current database by index
Sets
SADD
Add item
Sets
SCARD
Get size
Sets
SDIFF
Get difference
Sets
SDIFFSTORE
Store difference
Sets
SINTER
Intersection
Sets
SINTERSTORE
Store intersection
Sets
SISMEMBER
Check for item
Sets
SMEMBERS
Get all
Sets
SMOVE
Move item to another set
Sets
SPOP
Pop random item
Sets
SRANDMEMBER
Get random item
Sets
SREM
Remove matching
Sets
SSCAN
Iterate items
Sets
SUNION
Union
Sets
SUNIONSTORE
Store union
Database
DEL
Delete item
Database
DUMP
Serialise item
Database
EXISTS
Check for key
Database
EXPIRE
Set timeout on item
Database
EXPIREAT
Set timeout by timestamp
Database
KEYS
Get all keys matching pattern
Database
MIGRATE
Transfer an item between
Redis instances
MOVE Transfer an item between databases
Redis instances
OBJECT Inspect item
Redis instances
PERSIST Remove timeout
Redis instances
PEXPIRE Set timeout (ms)
Redis instances
PEXPIREAT
Set timeout (ms timestamp)
Redis instances
PTTL
Get item time to live (ms)
Redis instances
RANDOMKEY
Get random key
Redis instances
RENAME
Change item's key
Redis instances
RENAMENX
Change item's key if new key doesn't exist
Redis instances
RESTORE
Deserialise
Redis instances
SCAN
Iterate keys
Redis instances
SORT
Get or store sorted copy of list, set or sorted set
Redis instances
TTL
Get item time to live
Redis instances
TYPE
Get type of item
Scripts
EVAL
Run
Scripts
EVALSHA
Run cached
Scripts
SCRIPT EXISTS
Check by hash
Scripts
SCRIPT FLUSH
Clear cache
Scripts
SCRIPT KILL
Kill running script
Scripts
SCRIPT LOAD
Add to cache Lua scripts access keys through the array KEYS and additional arguments through the array ARGV.
Hashes
HDEL
Delete item
Hashes
HEXISTS
Check for item
Hashes
HGET
Get item
Hashes
HGETALL
Return all items
Hashes
HINCRBY
Add to integer value
Hashes
HINCRBYFLOAT
Add to float value
Hashes
HKEYS
Return all keys
Hashes
HLEN
Get number of items
Hashes
HMGET
Get multiple items
Hashes
HMSET
Set multiple items
Hashes
HSCAN
Iterate items
Hashes
HSET
Set item
Hashes
HSETNX
Set item if doesn't exist
Hashes
HVALS
Return all values
Sorted sets
ZADD
Add item
Sorted sets
ZCARD
Get number of items
Sorted sets
ZCOUNT
Number of items within score range
Sorted sets
ZINCRBY
Add to score
Sorted sets
ZINTERSTORE
Store intersection
Sorted sets
ZLEXCOUNT
Lexicographical range count
Sorted sets
ZRANGE
Get items within rank range Sorted sets (cont)
Sorted sets
ZLEXRANGE
Get items within lexicographical range
Sorted sets
ZRANGEBYSCORE
Get items within score range
Sorted sets
ZRANK
Get item rank
Sorted sets
ZREM
Remove item(s)
Sorted sets
ZREMRANGEBYLEX
Remove items within lexicographical range
Sorted sets
ZREMRANGEBYRANK
Remove items within rank range
Sorted sets
ZREMRANGEBYSCORE
Remove items within score range
Sorted sets
ZREVRANGE ZRANGE
in reverse order
Sorted sets
ZREVRANGEBYSCORE ZRANGEBYSCORE
in reverse order
Sorted sets
ZREVRANK ZRANK
in reverse order
Sorted sets
ZSCAN
Iterate items
Sorted sets
ZSCORE
Get item score
Sorted sets
ZUNIONSTORE
Store union Lexicographical commands require all items to have the same score
HyperLogLogs
PFADD
Add items
HyperLogLogs
PFCOUNT
Get approximate size
HyperLogLogs
PFMERGE
Merge HyperLogLogs