The documentation page here:
https://github.com/StackExchange/StackExchange.Redis/blob/master/docs/Scripting.md
says this:
To avoid retransmitting the Lua script to redis each time it is evaluated, LuaScript objects can be converted into LoadedLuaScripts via LuaScript.Load(IServer). LoadedLuaScripts are evaluated with the EVALSHA, and referred to by hash.
I have tested a bit and it seems that the client does send EVAL for the first time and uses EVALSHA afterwards itself to optimize the process. I think it is worth mentioning that it already behaves the way the documentation seem to suggest developers should implement themselves.
The documentation page here:
https://github.com/StackExchange/StackExchange.Redis/blob/master/docs/Scripting.md
says this:
I have tested a bit and it seems that the client does send EVAL for the first time and uses EVALSHA afterwards itself to optimize the process. I think it is worth mentioning that it already behaves the way the documentation seem to suggest developers should implement themselves.