You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add remarks for the evaluation methods of the 'LoadedLuaScript' abstraction which explicitly state that if a SHA-1 hash, of a previously loaded Lua script, was not found in the server cache - it will be reloaded with 'SCRIPT LOAD'. The first evaluation of the reloaded script will be carried out by the 'EVAL' command, but any subsequent evaluations will use 'EVALSHA'.
Copy file name to clipboardexpand all lines: docs/Scripting.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -37,8 +37,10 @@ Any object that exposes field or property members with the same name as @-prefix
37
37
38
38
StackExchange.Redis handles Lua script caching internally. It automatically transmits the Lua script to redis on the first call to 'ScriptEvaluate'. For further calls of the same script only the hash with [`EVALSHA`](https://redis.io/commands/evalsha) is used.
39
39
40
-
For more control of the Lua script transmission to redis, `LuaScript` objects can be converted into `LoadedLuaScript`s via `LuaScript.Load(IServer)`.
41
-
`LoadedLuaScripts` are evaluated with the [`EVALSHA`](https://redis.io/commands/evalsha), and referred to by hash.
40
+
For more control of the Lua script transmission to redis, `LoadedLuaScripts` are evaluated with the [`EVALSHA`](https://redis.io/commands/evalsha), and referred to by hash.
41
+
42
+
If a previously loaded `Lua` script `SHA-1` hash was not found on the server, the script will be reloaded on the next call to `Evaluate()` or `EvaluateAsync()` with `SCRIPT LOAD`.
43
+
The first evaluation of a reloaded script will be carried out by the `EVAL` redis command, any subsequent evaluations will use `EVALSHA`.
0 commit comments