module Protocol::Redis::Methods::Scripting
Public Instance Methods
Execute a Lua script server side. Depends on the script that is executed. @see redis.io/commands/eval @param script [String] @param numkeys [Integer] @param key [Key] @param arg [String]
# File lib/protocol/redis/methods/scripting.rb, line 33 def eval(*arguments) call("EVAL", *arguments) end
Execute a Lua script server side. Depends on the script that is executed. @see redis.io/commands/evalsha @param sha1 [String] @param numkeys [Integer] @param key [Key] @param arg [String]
# File lib/protocol/redis/methods/scripting.rb, line 43 def evalsha(*arguments) call("EVALSHA", *arguments) end
Set the debug mode for executed scripts. O(1). @see redis.io/commands/script debug @param mode [Enum]
# File lib/protocol/redis/methods/scripting.rb, line 50 def script_debug(*arguments) call("SCRIPT DEBUG", *arguments) end
Check existence of scripts in the script cache. O(N) with N being the number of scripts to check (so checking a single script is an O(1) operation). @see redis.io/commands/script exists @param sha1 [String]
# File lib/protocol/redis/methods/scripting.rb, line 57 def script_exists(*arguments) call("SCRIPT EXISTS", *arguments) end
Remove all the scripts from the script cache. O(N) with N being the number of scripts in cache. @see redis.io/commands/script flush
# File lib/protocol/redis/methods/scripting.rb, line 63 def script_flush(*arguments) call("SCRIPT FLUSH", *arguments) end
Kill the script currently in execution. O(1). @see redis.io/commands/script kill
# File lib/protocol/redis/methods/scripting.rb, line 69 def script_kill(*arguments) call("SCRIPT KILL", *arguments) end
Load the specified Lua script into the script cache. O(N) with N being the length in bytes of the script body. @see redis.io/commands/script load @param script [String]
# File lib/protocol/redis/methods/scripting.rb, line 76 def script_load(*arguments) call("SCRIPT LOAD", *arguments) end