SCRIPT-LOAD(3valkey)
π SCRIPT-LOAD π
okay bestie, welcome to SCRIPT-LOAD(3valkey) β straight out of the Valkey Command Manual and honestly? she's giving "quiet overachiever." no drama, just vibes and a SHA1 digest. β¨
πΈ NAME πΈ
script-load β loads a server-side Lua script into the script cache. that's it, that's the whole job, and she does it flawlessly. π
π SYNOPSIS π
SCRIPT LOAD script
β¨ DESCRIPTION β¨
so here's the tea π: you load a script into the scripts cache without executing it. no running, no side effects, just storing. once it's in the cache, you can call it with valkey-evalsha(7) EVALSHA using the correct SHA1 digest of the script β literally exactly like what happens after the first successful invocation of valkey-eval(7) EVAL. same energy, no cap. π₯
and like, the script is guaranteed to stay in the script cache forever (unless SCRIPT FLUSH is called, which is the one thing that can end this beautiful relationship π).
the command works the same way even if the script was already present in the script cache. no duplication, no fuss, she's unbothered. π
want the full lore on EVAL scripts? go read valkey-eval-intro(7) Introduction to Eval Scripts. it's the prequel, iykyk. π
π REPLY π
valkey-protocol(7) Bulk string reply: the SHA1 digest of the script added into the script cache. that's your receipt bestie, keep it safe. π§Ύβ¨
β COMPLEXITY β
O(N) with N being the length in bytes of the script body. linear, honest, no hidden nonsense. π«
π ACL CATEGORIES π
@scripting@slow
π¦ HISTORY π¦
- Available since: 2.6.0 β she's been iconic since day one, fr fr.
π SEE ALSO π
eval(3valkey)evalsha(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-show(3valkey)
no notes, just load your script and collect your digest. main character behavior only. π
okay that's the whole page, mwah π β this one's from Valkey 9.0.0, dated 2025-10-21, and yes she ate. πβ¨π¦
π¦ 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