EVALSHA(3valkey)
β¨ EVALSHA β¨
okay bestie, welcome to evalsha β the main character of the valkey-scripting cinematic universe π
πΈ NAME πΈ
evalsha β runs a server-side Lua script, but you only gotta know its SHA1 digest. no script body required, periodt.
π SYNOPSIS π
EVALSHA sha1 numkeys key [key...] arg [arg...]
π DESCRIPTION π
So like, this one evaluates a script straight out of the server's cache, and you find it by its SHA1 digest. that's it. that's the whole vibe. π₯
The server keeps those scripts cached thanks to the valkey-script-load(7) SCRIPT LOAD command. Other than the whole "no script body, just a digest" thing, this command is literally identical to valkey-eval(7) EVAL. no cap.
Want the full lore? Go read valkey-programmability(7) and valkey-eval-intro(7) β the Introduction to Eval Scripts β for everything about Lua scripts. iykyk π¦
π«Ά REPLY π«Ά
ngl the return value is fully dependent on whatever script you just ran. it's giving "mystery box" energy. whatever the script gives back is what you get. π
π COMPLEXITY π
also depends on the script. you want a number? ask the script. we don't know her. π
π ACL CATEGORIES π
@scripting@slow
β HISTORY β
- Available since:
2.6.0β a legend since day one, fr fr
π SEE ALSO π
eval(3valkey)evalsha_ro(3valkey)eval_ro(3valkey)fcall(3valkey)fcall_ro(3valkey)function(3valkey)function-delete(3valkey)function-dump(3valkey)function-flush(3valkey)function-help(3valkey)function-kill(3valkey)function-list(3valkey)function-load(3valkey)function-restore(3valkey)function-stats(3valkey)script(3valkey)script-debug(3valkey)script-exists(3valkey)script-flush(3valkey)script-help(3valkey)script-kill(3valkey)script-load(3valkey)script-show(3valkey)
okay that's the whole page, you ate that π
this was version 9.0.0, dated 2025-10-21, brought to you by the valkey girlies π§ stay slaying, and remember: cache your scripts before you evalsha them, or the server will humble you π
π¦ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms