Redis命令使用限制
更新时间:2025-02-20
概述
本文档以 Redis 7.2 版本的全部命令为基准。
主从节点实例与集群实例不支持的命令
- BGSAVE
- FLUSHDB
- FLUSHALL
- MIGRATE
- DEBUG
- BGREWRITEAOF
- LASTSAVE
- SAVE
- SYNC
- SLAVEOF
- SHUTDOWN
- ACL
PROXY命令支持情况概览
类别 | 支持情况 |
---|---|
数据读写类命令 | string、list、zset、hash、set、pubsub、geo、hyperloglog、stream、transaction 均支持 |
acl | 访问控制列表通过控制台配置,仅支持 acl whoami 查看当前用户 |
config | 不支持,可通过控制台变更配置 |
memory | 仅支持 memory usage,集群内存使用情况,通过控制台查看 |
client | 支持 clientid、info、kill、list、getname、setname、reply,其他不支持 |
cluster | 因为 SCS 是基于代理的架构和 redis cluster 在架构上有较大差异。 |
其他 |
Proxy 命令支持情况
下面按类别列出了 百度云数据库Redis 6.2 支持的所有命令,并标明了当前 Redis 平台是否支持。 说明:
- 表格中 Y 表示支持,N 表示不支持,Y # 表示需要依赖于 hash tag 来支持(保证多个 key 在同一分片)。
- Redis 版本,表示从哪个版本 Redis 中才出现这个命令。
server
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
acl load | Reload the ACLs from the configured ACL file. doc | 6.0.0 | N |
acl save | Save the current ACL rules in the configured ACL file. doc | 6.0.0 | N |
acl list | List the current ACL rules in ACL config file format. doc | 6.0.0 | N |
acl users | List the username of all the configured ACL rules. doc | 6.0.0 | N |
acl getuser | Get the rules for a specific ACL user. doc | 6.0.0 | N |
acl setuser | Modify or create the rules for a specific ACL user. doc | 6.0.0 | N |
acl deluser | Remove the specified ACL users and the associated rules. doc | 6.0.0 | N |
acl cat | List the ACL categories or the commands inside a category. doc | 6.0.0 | N |
acl genpass | Generate a pseudorandom secure password to use for ACL users. doc | 6.0.0 | N |
acl whoami | Return the name of the user associated to the current connection. doc | 6.0.0 | Y |
acl log | List latest events denied because of ACLs in place. doc | 6.0.0 | N |
acl help | Show helpful text about the different subcommands. doc | 6.0.0 | N |
bgrewriteaof | Asynchronously rewrite the append-only file. doc | 1.0.0 | N |
bgsave | Asynchronously save the dataset to disk. doc | 1.0.0 | N |
command | Get array of Redis command details. doc | 2.8.1 | Y |
command count | Get total number of Redis commands. doc | 2.8.1 | Y |
command getkeys | Extract keys given a full Redis command. doc | 2.8.1 | Y |
command info | Get array of specific Redis command details. doc | 2.8.1 | Y |
config get | Get the value of a configuration parameter. doc | 2.0.0 | Y |
config rewrite | Rewrite the configuration file with the in memory configuration. doc | 2.8.0 | N |
config set | Set a configuration parameter to the given value. doc | 2.0.0 | Y |
config resetstat | Reset the stats returned by INFO. doc | 2.0.0 | N |
dbsize | Return the number of keys in the selected database. doc | 1.0.0 | Y |
debug object | Get debugging information about a key. doc | 1.0.0 | N |
debug segfault | Make the server crash. doc | 1.0.0 | N |
failover | Start a coordinated failover between this server and one of its replicas.. doc | 6.2.0 | N |
flushall | Remove all keys from all databases. doc | 1.0.0 | Y |
flushdb | Remove all keys from the current database.doc | 1.0.0 | Y |
info | Get information and statistics about the server. doc | 1.0.0 | Y |
lolwut | Display some computer art and the Redis version. doc | 5.0.0 | N |
lastsave | Get the UNIX time stamp of the last successful save to disk. doc | 1.0.0 | N |
memory doctor | Outputs memory problems report. doc | 4.0.0 | N |
memory help | Show helpful text about the different subcommands. doc | 4.0.0 | N |
memory malloc-stats | Show allocator internal stats. doc | 4.0.0 | N |
memory purge | Ask the allocator to release memory. doc | 4.0.0 | N |
memory stats | Show memory usage details. doc | 4.0.0 | N |
memory usage | Estimate the memory usage of a key. doc | 4.0.0 | Y |
module list | List all modules loaded by the server. doc | 4.0.0 | N |
module load | Load a module. doc | 4.0.0 | N |
module unload | Unload a module. doc | 4.0.0 | N |
monitor | Listen for all requests received by the server in real time. doc | 1.0.0 | Y |
role | Return the role of the instance in the context of replication. doc | 2.8.1 | Y |
save | Synchronously save the dataset to disk. doc | 1.0.0 | N |
shutdown | Synchronously save the dataset to disk and then shut down the server. doc | 1.0.0 | N |
slaveof | Make the server a replica of another instance, or promote it as master. Deprecated starting with Redis 5. Use REPLICAOF instead.. doc | 1.0.0 | N |
replicaof | Make the server a replica of another instance, or promote it as master.. doc | 5.0.0 | N |
slowlog | Manages the Redis slow queries log. doc | 2.2.1 | N |
swapdb | Swaps two Redis databases.doc | 4.0.0 | N |
sync | Internal command used for replication. doc | 1.0.0 | N |
psync | Internal command used for replication. doc | 2.8.0 | N |
time | Return the current server time. doc | 2.6.0 | Y |
latency doctor | Return a human readable latency analysis report.. doc | 2.8.1 | Y |
latency graph | Return a latency graph for the event.. doc | 2.8.1 | Y |
latency history | Return timestamp-latency samples for the event.. doc | 2.8.1 | Y |
latency latest | Return the latest latency samples for all events.. doc | 2.8.1 | Y |
latency reset | Reset latency data for one or more events.. doc | 2.8.1 | Y |
latency help | Show helpful text about the different subcommands.. doc | 2.8.1 | Y |
string
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
append | Append a value to a key. doc | 2.0.0 | Y |
bitcount | Count set bits in a string. doc | 2.6.0 | Y |
bitfield | Perform arbitrary bitfield integer operations on strings. doc | 3.2.0 | Y |
bitfield_ro | Performs arbitrary read-only bitfield integer operations on strings. doc | 6.0.0 | Y |
bitop | Perform bitwise operations between strings. doc | 2.6.0 | Y |
bitpos | Find first bit set or clear in a string. doc | 2.8.7 | Y |
decr | Decrement the integer value of a key by one. doc | 1.0.0 | Y |
decrby | Decrement the integer value of a key by the given number. doc | 1.0.0 | Y |
get | Get the value of a key. doc | 1.0.0 | Y |
getbit | Returns the bit value at offset in the string value stored at key. doc | 2.2.0 | Y |
getdel | Get the value of a key and delete the key. doc | 6.2.0 | Y |
getex | Get the value of a key and optionally set its expiration. doc | 6.2.0 | Y |
getrange | Get a substring of the string stored at a key. doc | 2.4.0 | Y |
getset | Set the string value of a key and return its old value. doc | 1.0.0 | Y |
incr | Increment the integer value of a key by one. doc | 1.0.0 | Y |
incrby | Increment the integer value of a key by the given amount. doc | 1.0.0 | Y |
incrbyfloat | Increment the float value of a key by the given amount. doc | 2.6.0 | Y |
mget | Get the values of all the given keys. doc | 1.0.0 | Y |
mset | Set multiple keys to multiple values. doc | 1.0.1 | Y |
msetnx | Set multiple keys to multiple values, only if none of the keys exist. doc | 1.0.1 | Y # |
psetex | Set the value and expiration in milliseconds of a key. doc | 2.6.0 | Y |
set | Set the string value of a key. doc | 1.0.0 | Y |
setbit | Sets or clears the bit at offset in the string value stored at key. doc | 2.2.0 | Y |
setex | Set the value and expiration of a key. doc | 2.0.0 | Y |
setnx | Set the value of a key, only if the key does not exist. doc | 1.0.0 | Y |
setrange | Overwrite part of a string at key starting at the specified offset. doc | 2.2.0 | Y |
stralgo | Run algorithms (currently LCS) against strings. doc | 6.0.0 | N |
strlen | Get the length of the value stored in a key. doc | 2.2.0 | Y |
lcs | Finds the longest common substring. doc | 7.0.0 | Y |
connection
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
auth | Authenticate to the server. doc | 1.0.0 | Y |
client caching | Instruct the server about tracking or not keys in the next request. doc | 6.0.0 | N |
client id | Returns the client ID for the current connection. doc | 5.0.0 | Y |
client info | Returns information about the current client connection.. doc | 6.2.0 | Y |
client kill | Kill the connection of a client. doc | 2.4.0 | Y |
client list | Get the list of client connections. doc | 2.4.0 | Y |
client getname | Get the current connection name. doc | 2.6.9 | Y |
client getredir | Get tracking notifications redirection client ID if any. doc | 6.0.0 | N |
client unpause | Resume processing of clients that were paused. doc | 6.2.0 | N |
client pause | Stop processing commands from clients for some time. doc | 2.9.5 | N |
client reply | Instruct the server whether to reply to commands. doc | 3.2.0 | Y |
client setname | Set the current connection name. doc | 2.6.9 | Y |
client tracking | Enable or disable server assisted client side caching support. doc | 6.0.0 | N |
client trackinginfo | Return information about server assisted client side caching for the current connection. doc | 6.2.0 | N |
client unblock | Unblock a client blocked in a blocking command from a different connection. doc | 5.0.0 | N |
echo | Echo the given string. doc | 1.0.0 | Y |
hello | Handshake with Redis. doc | 6.0.0 | Y |
ping | Ping the server. doc | 1.0.0 | Y |
quit | Close the connection. doc | 1.0.0 | Y |
reset | Reset the connection. doc | 6.2.0 | N |
select | Change the selected database for the current connection. doc | 1.0.0 | Y |
list
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
blpop | Remove and get the first element in a list, or block until one is available. doc | 2.0.0 | Y # |
brpop | Remove and get the last element in a list, or block until one is available. doc | 2.0.0 | Y # |
brpoplpush | Pop an element from a list, push it to another list and return it; or block until one is available. doc | 2.2.0 | Y # |
blmove | Pop an element from a list, push it to another list and return it; or block until one is available. doc | 6.2.0 | Y # |
lindex | Get an element from a list by its index. doc | 1.0.0 | Y |
linsert | Insert an element before or after another element in a list. doc | 2.2.0 | Y |
llen | Get the length of a list. doc | 1.0.0 | Y |
lpop | Remove and get the first elements in a list. doc | 1.0.0 | Y |
lpos | Return the index of matching elements on a list. doc | 6.0.6 | Y |
lpush | Prepend one or multiple elements to a list. doc | 1.0.0 | Y |
lpushx | Prepend an element to a list, only if the list exists. doc | 2.2.0 | Y |
lrange | Get a range of elements from a list. doc | 1.0.0 | Y |
lrem | Remove elements from a list. doc | 1.0.0 | Y |
lset | Set the value of an element in a list by its index. doc | 1.0.0 | Y |
ltrim | Trim a list to the specified range. doc | 1.0.0 | Y |
rpop | Remove and get the last elements in a list. doc | 1.0.0 | Y |
rpoplpush | Remove the last element in a list, prepend it to another list and return it. doc | 1.2.0 | Y |
lmove | Pop an element from a list, push it to another list and return it. doc | 6.2.0 | Y |
rpush | Append one or multiple elements to a list. doc | 1.0.0 | Y |
rpushx | Append an element to a list, only if the list exists. doc | 2.2.0 | Y |
lmpop | Returns multiple elements from a list after removing them. Deletes the list if the last element was popped. doc | 7.0.0 | Y |
blmpop | Pops the first element from one of multiple lists. Blocks until an element is available otherwise. Deletes the list if the last element was popped. doc | 7.0.0 | Y |
sorted_set
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
bzpopmin | Remove and return the member with the lowest score from one or more sorted sets, or block until one is available. doc | 5.0.0 | Y |
bzpopmax | Remove and return the member with the highest score from one or more sorted sets, or block until one is available. doc | 5.0.0 | Y |
zadd | Add one or more members to a sorted set, or update its score if it already exists. doc | 1.2.0 | Y |
zcard | Get the number of members in a sorted set. doc | 1.2.0 | Y |
zcount | Count the members in a sorted set with scores within the given values. doc | 2.0.0 | Y |
zdiff | Subtract multiple sorted sets. doc | 6.2.0 | Y |
zdiffstore | Subtract multiple sorted sets and store the resulting sorted set in a new key. doc | 6.2.0 | Y # |
zincrby | Increment the score of a member in a sorted set. doc | 1.2.0 | Y |
zinter | Intersect multiple sorted sets. doc | 6.2.0 | Y |
zinterstore | Intersect multiple sorted sets and store the resulting sorted set in a new key. doc | 2.0.0 | Y |
zlexcount | Count the number of members in a sorted set between a given lexicographical range. doc | 2.8.9 | Y |
zpopmax | Remove and return members with the highest scores in a sorted set. doc | 5.0.0 | Y |
zpopmin | Remove and return members with the lowest scores in a sorted set. doc | 5.0.0 | Y |
zmpop | Returns the highest- or lowest-scoring members from one or more sorted sets after removing them. Deletes the sorted set if the last member was popped. doc | 7.0.0 | Y |
zrandmember | Get one or multiple random elements from a sorted set. doc | 6.2.0 | Y |
zrangestore | Store a range of members from sorted set into another key. doc | 6.2.0 | Y |
zrange | Return a range of members in a sorted set. doc | 1.2.0 | Y |
zrangebylex | Return a range of members in a sorted set, by lexicographical range. doc | 2.8.9 | Y |
zrevrangebylex | Return a range of members in a sorted set, by lexicographical range, ordered from higher to lower strings.. doc | 2.8.9 | Y |
zrangebyscore | Return a range of members in a sorted set, by score. doc | 1.0.5 | Y |
zrank | Determine the index of a member in a sorted set. doc | 2.0.0 | Y |
zrem | Remove one or more members from a sorted set. doc | 1.2.0 | Y |
zremrangebylex | Remove all members in a sorted set between the given lexicographical range. doc | 2.8.9 | Y |
zremrangebyrank | Remove all members in a sorted set within the given indexes. doc | 2.0.0 | Y |
zremrangebyscore | Remove all members in a sorted set within the given scores. doc | 1.2.0 | Y |
zrevrange | Return a range of members in a sorted set, by index, with scores ordered from high to low. doc | 1.2.0 | Y |
zrevrangebyscore | Return a range of members in a sorted set, by score, with scores ordered from high to low. doc | 2.2.0 | Y |
zrevrank | Determine the index of a member in a sorted set, with scores ordered from high to low. doc | 2.0.0 | Y |
zscore | Get the score associated with the given member in a sorted set. doc | 1.2.0 | Y |
zunion | Add multiple sorted sets. doc | 6.2.0 | Y |
zmscore | Get the score associated with the given members in a sorted set. doc | 6.2.0 | Y |
zunionstore | Add multiple sorted sets and store the resulting sorted set in a new key. doc | 2.0.0 | Y |
zscan | Incrementally iterate sorted sets elements and associated scores. doc | 2.8.0 | Y |
bzmpop | Removes and returns a member by score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped. doc | 7.0.0 | Y |
hash
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
hdel | Delete one or more hash fields. doc | 2.0.0 | Y |
hexists | Determine if a hash field exists. doc | 2.0.0 | Y |
hget | Get the value of a hash field. doc | 2.0.0 | Y |
hgetall | Get all the fields and values in a hash. doc | 2.0.0 | Y |
hincrby | Increment the integer value of a hash field by the given number. doc | 2.0.0 | Y |
hincrbyfloat | Increment the float value of a hash field by the given amount. doc | 2.6.0 | Y |
hkeys | Get all the fields in a hash. doc | 2.0.0 | Y |
hlen | Get the number of fields in a hash. doc | 2.0.0 | Y |
hmget | Get the values of all the given hash fields. doc | 2.0.0 | Y |
hmset | Set multiple hash fields to multiple values. doc | 2.0.0 | Y |
hset | Set the string value of a hash field. doc | 2.0.0 | Y |
hsetnx | Set the value of a hash field, only if the field does not exist. doc | 2.0.0 | Y |
hrandfield | Get one or multiple random fields from a hash. doc | 6.2.0 | Y |
hstrlen | Get the length of the value of a hash field. doc | 3.2.0 | Y |
hvals | Get all the values in a hash. doc | 2.0.0 | Y |
hscan | Incrementally iterate hash fields and associated values. doc | 2.8.0 | Y |
set
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
sadd | Add one or more members to a set. doc | 1.0.0 | Y |
scard | Get the number of members in a set. doc | 1.0.0 | Y |
sdiff | Subtract multiple sets. doc | 1.0.0 | Y |
sdiffstore | Subtract multiple sets and store the resulting set in a key. doc | 1.0.0 | Y |
sinter | Intersect multiple sets. doc | 1.0.0 | Y |
sinterstore | Intersect multiple sets and store the resulting set in a key. doc | 1.0.0 | Y |
sismember | Determine if a given value is a member of a set. doc | 1.0.0 | Y |
smismember | Returns the membership associated with the given elements for a set. doc | 6.2.0 | Y |
smembers | Get all the members in a set. doc | 1.0.0 | Y |
smove | Move a member from one set to another. doc | 1.0.0 | Y |
spop | Remove and return one or multiple random members from a set. doc | 1.0.0 | Y |
srandmember | Get one or multiple random members from a set. doc | 1.0.0 | Y |
srem | Remove one or more members from a set. doc | 1.0.0 | Y |
sunion | Add multiple sets. doc | 1.0.0 | Y |
sunionstore | Add multiple sets and store the resulting set in a key. doc | 1.0.0 | Y |
sscan | Incrementally iterate Set elements. doc | 2.8.0 | Y |
sintercard | Returns the number of members of the intersect of multiple sets. doc | 7.0.0 | Y |
zintercard | Returns the number of members of the intersect of multiple sorted sets. doc | 7.0.0 | Y |
generic
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
copy | Copy a key. doc | 6.2.0 | Y |
del | Delete a key. doc | 1.0.0 | Y |
dump | Return a serialized version of the value stored at the specified key.. doc | 2.6.0 | Y |
exists | Determine if a key exists. doc | 1.0.0 | Y |
expire | Set a key's time to live in seconds. doc | 1.0.0 | Y |
expireat | Set the expiration for a key as a UNIX timestamp. doc | 1.2.0 | Y |
keys | Find all keys matching the given pattern. doc | 1.0.0 | Y |
migrate | Atomically transfer a key from a Redis instance to another one.. doc | 2.6.0 | N |
move | Move a key to another database. doc | 1.0.0 | Y |
object | Inspect the internals of Redis objects. doc | 2.2.3 | Y |
persist | Remove the expiration from a key. doc | 2.2.0 | Y |
pexpire | Set a key's time to live in milliseconds. doc | 2.6.0 | Y |
pexpireat | Set the expiration for a key as a UNIX timestamp specified in milliseconds. doc | 2.6.0 | Y |
expiretime | Returns the expiration time of a key as a Unix timestamp. doc | 7.0.0 | Y |
pexpiretime | Returns the expiration time of a key as a Unix milliseconds timestamp. doc | 7.0.0 | Y |
pttl | Get the time to live for a key in milliseconds. doc | 2.6.0 | Y |
randomkey | Return a random key from the keyspace. doc | 1.0.0 | Y |
rename | Rename a key. doc | 1.0.0 | Y # |
renamenx | Rename a key, only if the new key does not exist. doc | 1.0.0 | Y # |
restore | Create a key using the provided serialized value, previously obtained using DUMP.. doc | 2.6.0 | Y |
sort | Sort the elements in a list, set or sorted set. doc | 1.0.0 | Y |
sort_ro | Returns the sorted elements of a list, a set, or a sorted set. doc | 7.0.0 | Y |
touch | Alters the last access time of a key(s). Returns the number of existing keys specified.. doc | 3.2.1 | Y |
ttl | Get the time to live for a key. doc | 1.0.0 | Y |
type | Determine the type stored at key. doc | 1.0.0 | Y |
unlink | Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking.. doc | 4.0.0 | Y |
wait | Wait for the synchronous replication of all the write commands sent in the context of the current connection. doc | 3.0.0 | N |
scan | Incrementally iterate the keys space. doc | 2.8.0 | Y |
readonly | Enables read-only queries for a connection to a Redis Cluster replica node. doc | 3.0.0 | Y |
readwrite | Enables read-write queries for a connection to a Reids Cluster replica node. doc | 3.0.0 | Y |
pubsub
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
psubscribe | Listen for messages published to channels matching the given patterns. doc | 2.0.0 | Y |
pubsub | Inspect the state of the Pub/Sub subsystem. doc | 2.8.0 | Y |
publish | Post a message to a channel. doc | 2.0.0 | Y |
punsubscribe | Stop listening for messages posted to channels matching the given patterns. doc | 2.0.0 | Y |
subscribe | Listen for messages published to the given channels. doc | 2.0.0 | Y |
unsubscribe | Stop listening for messages posted to the given channels. doc | 2.0.0 | Y |
ssubscribe | Listens for messages published to shard channels. doc | 7.0.0 | Y |
spublish | Post a message to a shard channel.doc | 7.0.0 | Y |
scripting
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
eval | Execute a Lua script server side. doc | 2.6.0 | Y |
evalsha | Execute a Lua script server side. doc | 2.6.0 | Y |
script debug | Set the debug mode for executed scripts.. doc | 3.2.0 | N |
script exists | Check existence of scripts in the script cache.. doc | 2.6.0 | Y |
script flush | Remove all the scripts from the script cache.. doc | 2.6.0 | Y |
script kill | Kill the script currently in execution.. doc | 2.6.0 | Y |
script load | Load the specified Lua script into the script cache.. doc | 2.6.0 | Y |
eval_ro | Executes a read-only server-side Lua script. doc | 7.0.0 | Y |
evalsha_ro | Executes a read-only server-side Lua script by SHA1 digest. doc | 7.0.0 | Y |
function delete | Deletes a library and its functions. doc | 7.0.0 | Y |
function dump | Dumps all libraries into a serialized binary payload. doc | 7.0.0 | Y |
function flush | Deletes all libraries and functions. doc | 7.0.0 | Y |
function kill | Terminates a function during execution. doc | 7.0.0 | Y |
function list | Returns information about all libraries. doc | 7.0.0 | Y |
function load | Creates a library. doc | 7.0.0 | Y |
function restore | Restores all libraries from a payload. doc | 7.0.0 | Y |
function stats | Returns information about a function during execution. doc | 7.0.0 | Y |
fcall | Invokes a function. doc | 7.0.0 | Y |
fcall_ro | Invokes a read-only function. doc | 7.0.0 | Y |
geo
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
geoadd | Add one or more geospatial items in the geospatial index represented using a sorted set. doc | 3.2.0 | Y |
geohash | Returns members of a geospatial index as standard geohash strings. doc | 3.2.0 | Y |
geopos | Returns longitude and latitude of members of a geospatial index. doc | 3.2.0 | Y |
geodist | Returns the distance between two members of a geospatial index. doc | 3.2.0 | Y |
georadius | Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point. doc | 3.2.0 | Y |
georadiusbymember | Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member. doc | 3.2.0 | Y |
georadiusbymember_ro | Returns members from a geospatial index that are within a distance from a member. doc | 7.0.0 | Y |
geosearch | Query a sorted set representing a geospatial index to fetch members inside an area of a box or a circle.. doc | 6.2.0 | Y |
geosearchstore | Query a sorted set representing a geospatial index to fetch members inside an area of a box or a circle, and store the result in another key.. doc | 6.2.0 | Y |
hyperloglog
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
pfadd | Adds the specified elements to the specified HyperLogLog.. doc | 2.8.9 | Y |
pfcount | Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).. doc | 2.8.9 | Y |
pfmerge | Merge N different HyperLogLogs into a single one.. doc | 2.8.9 | Y |
cluster
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
cluster addslots | Assign new hash slots to receiving node. doc | 3.0.0 | N |
cluster bumpepoch | Advance the cluster config epoch. doc | 3.0.0 | N |
cluster count-failure-reports | Return the number of failure reports active for a given node. doc | 3.0.0 | N |
cluster countkeysinslot | Return the number of local keys in the specified hash slot. doc | 3.0.0 | N |
cluster delslots | Set hash slots as unbound in receiving node. doc | 3.0.0 | N |
cluster failover | Forces a replica to perform a manual failover of its master.. doc | 3.0.0 | N |
cluster flushslots | Delete a node's own slots information. doc | 3.0.0 | N |
cluster forget | Remove a node from the nodes table. doc | 3.0.0 | N |
cluster getkeysinslot | Return local key names in the specified hash slot. doc | 3.0.0 | N |
cluster info | Provides info about Redis Cluster node state. doc | 3.0.0 | Y |
cluster keyslot | Returns the hash slot of the specified key.doc | 3.0.0 | Y |
cluster meet | Force a node cluster to handshake with another node. doc | 3.0.0 | N |
cluster myid | Return the node id. doc | 3.0.0 | Y |
cluster nodes | Get Cluster config for the node. doc | 3.0.0 | Y |
cluster replicate | Reconfigure a node as a replica of the specified master node. doc | 3.0.0 | N |
cluster reset | Reset a Redis Cluster node. doc | 3.0.0 | N |
cluster saveconfig | Forces the node to save cluster state on disk. doc | 3.0.0 | N |
cluster set-config-epoch | Set the configuration epoch in a new node. doc | 3.0.0 | N |
cluster setslot | Bind a hash slot to a specific node. doc | 3.0.0 | N |
cluster slaves | List replica nodes of the specified master node. doc | 3.0.0 | Y |
cluster replicas | List replica nodes of the specified master node. doc | 5.0.0 | Y |
cluster slots | Get array of Cluster slot to node mappings. doc | 3.0.0 | Y |
readonly | Enables read queries for a connection to a cluster replica node. doc | 3.0.0 | Y |
readwrite | Disables read queries for a connection to a cluster replica node. doc | 3.0.0 | Y |
stream
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
xinfo | Get information on streams and consumer groups. doc | 5.0.0 | Y |
xadd | Appends a new entry to a stream. doc | 5.0.0 | Y |
xtrim | Trims the stream to (approximately if '~' is passed) a certain size. doc | 5.0.0 | Y |
xdel | Removes the specified entries from the stream. Returns the number of items actually deleted, that may be different from the number of IDs passed in case certain IDs do not exist.. doc | 5.0.0 | Y |
xrange | Return a range of elements in a stream, with IDs matching the specified IDs interval. doc | 5.0.0 | Y |
xrevrange | Return a range of elements in a stream, with IDs matching the specified IDs interval, in reverse order (from greater to smaller IDs) compared to XRANGE. doc | 5.0.0 | Y |
xlen | Return the number of entries in a stream. doc | 5.0.0 | Y |
xread | Return never seen elements in multiple streams, with IDs greater than the ones reported by the caller for each stream. Can block.. doc | 5.0.0 | Y |
xgroup | Create, destroy, and manage consumer groups.. doc | 5.0.0 | Y |
xreadgroup | Return new entries from a stream using a consumer group, or access the history of the pending entries for a given consumer. Can block.. doc | 5.0.0 | Y |
xack | Marks a pending message as correctly processed, effectively removing it from the pending entries list of the consumer group. Return value of the command is the number of messages successfully acknowledged, that is, the IDs we were actually able to resolve in the PEL.. doc | 5.0.0 | Y |
xclaim | Changes (or acquires) ownership of a message in a consumer group, as if the message was delivered to the specified consumer.. doc | 5.0.0 | Y |
xautoclaim | Changes (or acquires) ownership of messages in a consumer group, as if the messages were delivered to the specified consumer.. doc | 6.2.0 | Y |
xpending | Return information and entries from a stream consumer group pending entries list, that are messages fetched but never acknowledged.. doc | 5.0.0 | Y |
xsetid | An internal command for replicating stream values. doc | 5.0.0 | Y |
transactions
支持率:5 / 5
命令 | 描述 | Redis 版本 | 是否支持 |
---|---|---|---|
discard | Discard all commands issued after MULTI. doc | 2.0.0 | Y # |
exec | Execute all commands issued after MULTI. doc | 1.2.0 | Y # |
multi | Mark the start of a transaction block. doc | 1.2.0 | Y # |
unwatch | Forget about all watched keys. doc | 2.2.0 | Y # |
watch | Watch the given keys to determine execution of the MULTI/EXEC block. doc | 2.2.0 | Y # |