EVALSHA
EVALSHA sha1 numkeys [key [key ...]] [arg [arg ...]]
- Available since:
- Redis Open Source 2.6.0
- Time complexity:
- Depends on the script that is executed.
- ACL categories:
-
@slow,@scripting, - Compatibility:
- Redis Software and Redis Cloud compatibility
Note:
This command's behavior varies in clustered Redis environments. See the multi-key operations page for more information.Evaluate a script from the server's cache by its SHA1 digest.
The server caches scripts by using the SCRIPT LOAD command.
The command is otherwise identical to EVAL.
Please refer to the Redis Programmability and Introduction to Eval Scripts for more information about Lua scripts.
Required arguments
sha1
The SHA1 digest of a script previously cached with SCRIPT LOAD or EVAL.
numkeys
The number of key names that follow. Arguments after the keys are passed as regular arguments.
Optional arguments
key [key ...]
The key names the script accesses, provided to it via the Lua KEYS global variable. There must be exactly numkeys of them.
arg [arg ...]
Additional arguments provided to the script via the Lua ARGV variable.
Redis Software and Redis Cloud compatibility
| Redis Software |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard |
✅ Standard |
Return information
The return value depends on the script that was executed.