tencent cloud

Feedback

scripting and functions Group

Last updated: 2024-11-25 15:42:24
The standard architecture of Redis 2.8, and the standard and cluster architectures of Redis 4.0, 5.0, 6.2, and 7.0 support the following commands: eval, evalsha, script exists, script flush, script load, and script kill. However, none of these architectures support the script debug command. The cluster architecture does not support eval, evalsha, or script exists commands in cross-slot scenarios. Function-related commands are introduced in Redis 7.0, as detailed in the table below.
Command Group
Command
New Description
Function (New in Redis 7.0)
FUNCTION DELETE library-name
Introduces the Function feature.
Deletes a library and its functions.
FUNCTION DUMP
Exports all functions.
FUNCTION FLUSH [ASYNC | SYNC]

Deletes all libraries and their functions.
FUNCTION KILL

Kills the currently executing function.
FUNCTION LIST [LIBRARYNAME library-name-pattern] [WITHCODE]
Returns information about libs and functions.
FUNCTION LOAD [REPLACE] function-code
Loads or replaces functions.
FUNCTION RESTORE serialized-value [FLUSH | APPEND | REPLACE]


Used to restore a snapshot previously saved using the SAVE or BGSAVE command.
FLUSH: Clears all data in the current database before the snapshot is restored.
APPEND: Appends all data in the current database to the snapshot before the snapshot is restored.
REPLACE: Replaces all data in the current database with the data in the snapshot before the snapshot is restored.
FUNCTION STATS
Returns the status of the currently executing function.
FCALL function numkeys [key [key ...]] [arg [arg ...]]
Calls a specific function.
FCALL_RO function numkeys [key [key ...]] [arg [arg ...]]
A read-only version of the FCALL command.
Scripting group
EVAL_RO script numkeys [key [key ...]] [arg [arg ...]]
A new command that allows running Lua scripts on read-only replicas.
EVALSHA_RO sha1 numkeys [key [key ...]] [arg [arg ...]]
A new command that allows running Lua scripts on read-only replicas.
The supported command details for each version are shown in the table below, where ✓ indicates support, x indicates not support, and - indicates that the command does not involve cross-slot access scenarios.
Command
2.8 Memory Edition (Standard Architecture)
4.0 Memory Edition (Standard Architecture)
4.0 Memory Edition (Cluster Architecture)
5.0 Memory Edition (Standard Architecture)
5.0 Memory Edition (Cluster Architecture)
6.2 Memory Edition (Standard Architecture)
6.2 Memory Edition (Cluster Architecture)
7.0 Memory Edition (Standard Architecture)
7.0 Memory Edition (Cluster Architecture)
Memory Edition (Cluster Architecture) with Cross-Slot Support
eval
x
eval_ro
x
x
x
x
x
x
x
-
evalsha
x
evalsha_ro
x
x
x
x
x
x
x
-
script debug
x
x
x
x
x
x
x
x
x
-
script exists
x
script flush
-
script load
-
script kill
-
fuction delete
x
x
x
x
x
x
x
-
fuction kill
x
x
x
x
x
x
x
-
fuction dump
x
x
x
x
x
x
x
-
fuction flush
x
x
x
x
x
x
x
-
fuction list
x
x
x
x
x
x
x
-
fuction load
x
x
x
x
x
x
x
-
fuction restore
x
x
x
x
x
x
x
-
fuction status
x
x
x
x
x
x
x
-
fcall
x
x
x
x
x
x
x
-
fcall_ro
x
x
x
x
x
x
x
-
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