Skip to content

Commit 658ef1f

Browse files
committed
Address misleading documentation
Remove references that mention SHA-1 hashes being passed when evaluating server loaded Lua scripts. The current implementation passes the script itself instead of the hash, generated when the script was initially loaded, due to resiliency concerns.
1 parent 571d832 commit 658ef1f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/StackExchange.Redis/LuaScript.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public sealed class LoadedLuaScript
239239

240240
/// <summary>
241241
/// <para>The SHA1 hash of ExecutableScript.</para>
242-
/// <para>This is sent to Redis instead of ExecutableScript during Evaluate and EvaluateAsync calls.</para>
242+
/// <para>This is not sent to Redis, instead ExecutableScript is used during Evaluate and EvaluateAsync calls.</para>
243243
/// </summary>
244244
/// <remarks>Be aware that using hash directly is not resilient to Redis server restarts.</remarks>
245245
[EditorBrowsable(EditorBrowsableState.Never)]
@@ -257,8 +257,8 @@ internal LoadedLuaScript(LuaScript original, byte[] hash)
257257
/// <summary>
258258
/// <para>Evaluates this LoadedLuaScript against the given database, extracting parameters for the passed in object if any.</para>
259259
/// <para>
260-
/// This method sends the SHA1 hash of the ExecutableScript instead of the script itself.
261-
/// If the script has not been loaded into the passed Redis instance, it will fail.
260+
/// This method evaluates the script itself and does not send the SHA-1 hash, generated by the server when loaded initially, in order to execute it.
261+
/// If the script has not been loaded into the passed Redis instance, it will not fail.
262262
/// </para>
263263
/// </summary>
264264
/// <param name="db">The redis database to evaluate against.</param>
@@ -275,8 +275,8 @@ public RedisResult Evaluate(IDatabase db, object? ps = null, RedisKey? withKeyPr
275275
/// <summary>
276276
/// <para>Evaluates this LoadedLuaScript against the given database, extracting parameters for the passed in object if any.</para>
277277
/// <para>
278-
/// This method sends the SHA1 hash of the ExecutableScript instead of the script itself.
279-
/// If the script has not been loaded into the passed Redis instance, it will fail.
278+
/// This method evaluates the script itself and does not send the SHA-1 hash, generated by the server when loaded initially, in order to execute it.
279+
/// If the script has not been loaded into the passed Redis instance, it will not fail.
280280
/// </para>
281281
/// </summary>
282282
/// <param name="db">The redis database to evaluate against.</param>

0 commit comments

Comments
 (0)