Load a function library into the server.

Section: Lua scripts and functions

Load a Redis function library

bash
bash
FUNCTION LOAD "#!lua name=mylib\nredis.register_function('ping', function() return 'pong' end)"

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Lua scripts and functions
Run a Lua script
Execute Lua server-side atomically.
OpenIn sheetbashsame section
Run a cached Lua script by SHA
Execute a previously loaded Lua script.
OpenIn sheetbashsame section
Load a Lua script
Cache a Lua script and return its SHA1.
OpenIn sheetbashsame section
Check cached scripts
Check whether one or more scripts are cached.
OpenIn sheetbashsame section
Clear cached scripts
Remove all cached Lua scripts.
OpenIn sheetbashsame section
List loaded function libraries
Inspect currently loaded libraries and functions.
OpenIn sheetbashsame section