EVALSHA(3valkey)

πŸ“¦
version 9.0.6 Β· 2 versions
, in fedora 44

✨ 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 🌈


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