SCRIPT LOAD
SCRIPT LOAD script
- Available since:
- Redis Open Source 2.6.0
- Time complexity:
- O(N) with N being the length in bytes of the script body.
- ACL categories:
-
@slow,@scripting, - Compatibility:
- Redis Software and Redis Cloud compatibility
Load a script into the scripts cache, without executing it.
After the specified command is loaded into the script cache it will be callable
using EVALSHA with the correct SHA1 digest of the script, exactly like after
the first successful invocation of EVAL.
The script is guaranteed to stay in the script cache forever (unless SCRIPT FLUSH is called).
The command works in the same way even if the script was already present in the script cache.
For more information about EVAL scripts please see Introduction to Eval Scripts.
Required arguments
script
The Lua script to load into the script cache. Its SHA1 digest is returned for use with EVALSHA.
Redis Software and Redis Cloud compatibility
| Redis Software |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard |
✅ Standard |
Return information
Bulk string reply: the SHA1 digest of the script added into the script cache.