字符串

APPEND

Append

BITCOUNT

Count set bits

BITOP

Bitwise operations

BITPOS

Find first set bit

DECR

Decrement integer

DECRBY

Subtract from integer

GET

Get by key

GETBIT

Get bit by index

GETRANGE

Get substring

GETSET

Set, returning old value

INCR

Increment integer

INCRBY

Add to integer

INCRBYFLOAT

Add to float

MGET

Get multiple

MSET

Set multiple

MSETNX

Set multiple if don't exist

PSETEX

Set with expiry (ms)

SET

Set

SETBIT

Set bit by index

SETEX

Set with expiry (seconds)

SETNX

Set if doesn't exist

SETRANGE

Set substring

STRLEN

Get length

Lists

Blocking left pop
Blocking right pop
Blocking rotate
Access by index
Insert next to
Get length
Pop from start
Push onto start
Push if list exists
Access range
Remove
Set item by index
Remove start and/or end items
Pop from end
Rotate
Push onto end
Push onto end if list exists

客户端/服务器

AUTH

请求身份验证

ECHO

返回信息

PING

测试连接

QUIT

关闭连接

SELECT

按索引设置当前数据库

Sets

Add item
Get size
Get difference
Store difference
Inters­ection
Store inters­ection
Check for item
Get all
Move item to another set
Pop random item
Get random item
Remove matching
Iterate items
Union
Store union

数据库

DEL

删除item

DUMP

序列化item

EXISTS

检查键key

EXPIRE

在item上设置超时

EXPIREAT

Set timeout by timestamp

KEYS

Get all keys matching pattern

MIGRATE

Transfer an item between Redis instances

MOVE

Transfer an item between databases

OBJECT

Inspect item

PERSIST

Remove timeout

PEXPIRE

Set timeout (ms)

PEXPIREAT

Set timeout (ms timestamp)

PTTL

Get item time to live (ms)

RANDOMKEY

Get random key

RENAME

Change item's key

RENAMENX

Change item's key if new key doesn't exist

RESTORE

Deseri­alise

SCAN

Iterate keys

SORT

Get or store sorted copy of list, set or sorted set

TTL

Get item time to live

TYPE

Get type of item

Scripts脚本

EVAL

运行

EVALSHA

运行缓存

SCRIPT EXISTS

通过哈希检查

SCRIPT FLUSH

清除缓存

SCRIPT KILL

关闭所有运行中的脚本

SCRIPT LOAD

添加至缓存

Hashes哈希

HDEL

Delete item

HEXISTS

Check for item

HGET

Get item

HGETALL

Return all items

HINCRBY

Add to integer value

HINCRBYFLOAT

Add to float value

HKEYS

Return all keys

HLEN

Get number of items

HMGET

Get multiple items

HMSET

Set multiple items

HSCAN

Iterate items

HSET

Set item

HSETNX

Set item if doesn't exist

HVALS

Return all values

排序过的sets

ZADD

新增项目

ZCARD

获取项目数

ZCOUNT

分数范围内的项目数

ZINCRBY

添加到评分

ZINTERSTORE

存储交叉点

ZLEXCOUNT

Lexico­gra­phical range count

ZRANGE

Get items within rank range

ZLEXRANGE

Get items within lexico­gra­phical range

ZRANGEBYSCORE

Get items within score range

ZRANK

Get item rank

ZREM

Remove item(s)

ZREMRANGEBYLEX

Remove items within lexico­gra­phical range

ZREMRANGEBYRANK

Remove items within rank range

ZREMRANGEBYSCORE

Remove items within score range

ZREVRANGE

ZRANGE in reverse order

ZREVRANGEBYSCORE

ZRANGE­BYSCORE in reverse order

ZREVRANK

ZRANK in reverse order

ZSCAN

Iterate items

ZSCORE

Get item score

ZUNIONSTORE

Store union

Lexico­gra­phical commands require all items to have the same score

HyperL­ogLogs

Add items
Get approx­imate size
Merge HyperL­ogLogs