函数 DELETE

Syntax
FUNCTION DELETE library-name
Available since:
7.0.0
Time complexity:
O(1)
ACL categories:
@write, @slow, @scripting,

删除一个库及其所有函数。

此命令删除名为library-name的库及其中的所有函数。 如果库不存在,服务器将返回错误。

更多信息请参考Introduction to Redis Functions

示例

redis> FUNCTION LOAD "#!lua name=mylib \n redis.register_function('myfunc', function(keys, args) return 'hello' end)"
"mylib"
redis> FCALL myfunc 0
"hello"
redis> FUNCTION DELETE mylib
OK
redis> FCALL myfunc 0
(error) ERR Function not found

RESP2/RESP3 回复

Simple string reply: OK.
RATE THIS PAGE
Back to top ↑