FUNCTION DELETE

语法
FUNCTION DELETE library-name
可用版本
Redis 开源版 7.0.0
时间复杂度
O(1)
ACL 分类
@write, @slow, @scripting,

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

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

更多信息请参考Redis 函数简介

示例

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 回复

简单字符串回复OK
评价本页
回到顶部 ↑