Introduction
EVALSHA lets you run a saved script in Redis quickly by using its unique ID instead of sending the whole script every time.
EVALSHA <sha1> <numkeys> [key1 key2 ...] [arg1 arg2 ...]
EVALSHA a3f5c9e7d8b1c2e3f4a5b6c7d8e9f0a1b2c3d4e5 2 key1 key2 arg1 arg2EVALSHA 5d41402abc4b2a76b9719d911017c592 0
SCRIPT LOAD "return {KEYS[1],ARGV[1]}" EVALSHA <sha1> 1 mykey myarg
EVALSHA primarily do?EVALSHA in Redis?127.0.0.1:6379> SCRIPT LOAD "return {KEYS[1],ARGV[1]}"
"a1b2c3d4e5f6g7h8i9j0"
127.0.0.1:6379> EVALSHA a1b2c3d4e5f6g7h8i9j0 1 mykey myargEVALSHA command?EVALSHA deadbeef 2 key1 key2 arg1 but get the error NOSCRIPT No matching script. What is the most likely cause?SCRIPT LOAD and EVALSHA to run the script multiple times with different keys and arguments?Pass the test and this pattern moves unknown