tencent cloud

Feedback

Overview of Commands Supported in the Community Edition

Last updated: 2024-09-24 12:31:09
    For supported commands by versions and architecture, see the following command groups. In the command group tables, ✓ indicates "supported", x indicates "unsupported", and - indicates that cross-slot access is not applicable to the command. For details about parameters and directions of the supported commands, see Redis commands.
    Note:
    For detailed descriptions of command parameters and usage examples, see Redis Command Reference.

    Commands Supported in the Redis 7.0

    Several new commands and parameters are added in the open-source Redis 7.0. The current support status in TencentDB for Redis is shown in the table below.
    Command Family
    Command
    Description
    sorted sets
    ZMPOP numkeys key [key ...] <MIN | MAX> [COUNT count]
    New command.
    Atomically pops the minimum or maximum members from multiple sorted sets.
    COUNT count: Specifies how many members to pop at once. The default is 1.
    MIN or MAX: Specifies whether to pop the smallest or largest members in the set.
    Supports multi-key operations.
    BZMPOP timeout numkeys key [key ...] <MIN | MAX> [COUNT count]
    New command.
    Atomically pops one or more members with the highest or lowest score from one or more sorted sets, supporting blocking operations. Timeout is the timeout period (in milliseconds) for the command to wait.
    Supports multi-key operations.
    ZINTERCARD numkeys key [key ...] [LIMIT limit]
    New command.
    Used for zset data type. Computes the intersection of two or more sorted sets and returns the number of elements in the intersection.
    numkeys: The number of sorted sets.
    key: The key names of the sorted sets.
    AGGREGATE: Specifies the aggregation method.
    Limit: The number of results returned.
    list family
    LMPOP numkeys key [key ...] <LEFT | RIGHT> [COUNT count]
    New command.
    Pops COUNT elements from a list, with the pop direction controlled by LEFT or RIGHT.
    Multi-key commands.
    BLMPOP timeout numkeys key [key ...] <LEFT | RIGHT> [COUNT count]
    New command.
    A blocking version of lmpop, where timeout specifies the blocking time.
    If blmpop is used within multi exec, it behaves the same as lmpop. This specification is defined by Redis, and the proxy does not apply any special handling.
    sets family
    SINTERCARD numkeys key [key ...] [LIMIT limit]
    New command.
    Used for the set data type. Returns the number of intersections of the specified key, which is up to LIMIT.
    keys family
    EXPIRETIME key
    New command.
    Returns the expiration time of the key as a timestamp in seconds.
    PEXPIRETIME key
    New command.
    Returns the expiration time of the key as a timestamp in milliseconds.
    EXPIRE key seconds [NX | XX | GT | LT]
    
    New parameters: NX | XX | GT | LT.
    NX: Sets the expiration time only if the key does not have an expiration time.
    XX: Sets the expiration time only if the key has an expiration time.
    GT: Sets the new expiration time only if it is greater than the current expiration time.
    LT: Sets the new expiration time only if it is less than the current expiration time.
    SORT_RO key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC | DESC] [ALPHA]
    New command.
    Sorts and obtains the sorted results from sorted sets in the Redis.
    string family
    SET key value [NX | XX] [GET] [EX seconds | PX milliseconds | EXAT unix-time-seconds | PXAT unix-time-milliseconds | KEEPTTL]
    New parameters: NX and GET.
    NX: Stands for Not exists and sets the key-value pair only if the key does not exist.
    GET: Sets the new value and returns the old value.
    BITPOS key bit [start [end [BYTE | BIT]]]
    New parameters: BYTE and BIT, which specify the unit of the offset. BYTE represents byte offset, and BIT represents bit offset. The default is BYTE.
    LCS key1 key2 [LEN] [IDX] [MINMATCHLEN min-match-len] [WITHMATCHLEN]
    New command.
    Returns the longest common subsequence between two keys.
    scripting group
    EVAL_RO script numkeys [key [key ...]] [arg [arg ...]]
    New command that allows running Lua scripts in read-only replicas.
    EVALSHA_RO sha1 numkeys [key [key ...]] [arg [arg ...]]
    New command that allows running Lua scripts in read-only replicas.
    Function (New in Redis 7.0)
    FUNCTION DELETE library-name
    New Function feature.
    Deletes a lib and its functions.
    FUNCTION DUMP
    Exports all functions.
    23.FUNCTION FLUSH [ASYNC | SYNC]
    
    Deletes all libs and their functions.
    FUNCTION KILL
    
    Kills the currently executing functions.
    FUNCTION LIST [LIBRARYNAME library-name-pattern] [WITHCODE]
    Returns information about libs and their functions.
    FUNCTION LOAD [REPLACE] function-code
    Loads or replaces a function.
    FUNCTION RESTORE serialized-value [FLUSH | APPEND | REPLACE]
    
    Used for recovering the snapshots previously saved with the SAVE or BGSAVE command.
    FLUSH: Before the snapshot is recovered, all the current data in the database will be cleared.
    APPEND: Before the snapshot is recovered, the current data in the database will be appended to the data in the snapshot.
    REPLACE: Before the snapshot is recovered, the current data in the database will be completely replaced by the data in the snapshot.
    FUNCTION STATS
    Returns the status of currently executing functions.
    FCALL function numkeys [key [key ...]] [arg [arg ...]]
    Calls a specific function.
    FCALL_RO function numkeys [key [key ...]] [arg [arg ...]]
    Readonly version of FCALL.
    stream
    XADD key [NOMKSTREAM] [<MAXLEN | MINID> [= | ~] threshold [LIMIT count]] <* | id> field value [field value ...]
    New parameters, allowing message IDs to be generated at a specific millisecond.
    server family
    CONFIG SET/GET
    New parameters added for atomic handling of set and get operations for multiple configurations.
    Quit
    Marked as deprecated. Clients can directly close the TCP connection.
    SHUTDOWN [NOSAVE | SAVE] [NOW] [FORCE] [ABORT]
    New parameters: NOW, FORCE, and ABORT.
    NOW: Shuts down immediately without waiting for any ongoing commands to complete.
    FORCE: Forces the Redis server to shut down, even if commands are still being executed.
    ABORT: Terminates the currently executing commands and prevents the execution of any other commands.
    COMMAND GETKEYSANDFLAGS command [arg [arg ...]]
    New command that retrieves the keys and flags associated with a command.
    COMMAND DOCS [command-name [command-name ...]]
    New command. Returns the documentation information of specified commands, including historical changes.
    COMMAND LIST [FILTERBY <MODULE module-name | ACLCAT category | PATTERN pattern>]
    New command. Returns the list of Redis commands.
    COMMAND INFO
    Updated command. Returns information about Redis commands.
    INFO [section [section ...]]
    New parameter. The retrieval of multiple sections at once is supported.
    XGROUP CREATE key group <id | $> [MKSTREAM] [ENTRIESREAD entries-read]
    ENTRIESREAD is added to set and enable the entries-read and lag features.
    XGROUP SETID key group <id | $> [ENTRIESREAD entries-read]
    ENTRIESREAD is added to set and enable the entries-read and lag features.

    Commands supported in the Redis 6.2

    Several new commands and parameters are added in the open-source Redis 6.2. The current support status in TencentDB for Redis is shown in the table below.
    Command Family
    Command
    New Commands and Parameters in the Community Edition
    Supported
    server family
    MONITOR
    In the Redis 6.2, the AUTH command will not be output in the MONITOR command's output.
    Yes
    keys family
    DEL
    Enables lazyfree-lazy-user-del, i.e., lazy eviction mechanism.
    Yes
    SCAN
    The TYPE parameter is added to specify the type of keys to return.
    No
    connection family
    CLIENT LIST
    The laddr field and ID filter parameters are added.
    The laddr field refers to the client's local address and port number.
    The ID filter is an optional filter to specify which client's details to return.
    No
    CLIENT KILL
    The local address parameter is added to specify the local address and port number of the client to be closed.
    No
    AUTH
    The username parameter is added to support authentication with usernames and passwords.
    No
    list family
    LPOP
    LPOP key [count], where the count parameter is added to specify the number of elements to pop.
    Yes
    RPOP
    RPOP key [count], where the count parameter is added to specify the number of elements to pop.
    Yes
    stream family
    XPENDING
    The IDLE parameter is added to specify the idle time threshold for consumers.
    Yes
    XADD
    Three options are added: NOMKSTREAM, MINID, and LIMIT.
    NOMKSTREAM prevents the automatic creation of Stream.
    MINID specifies the minimum message ID in the Stream.
    LIMIT specifies the number of messages per Stream.
    Yes
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support