Module: Protocol::Redis::Methods::Scripting
- Defined in:
- lib/protocol/redis/methods/scripting.rb
Instance Method Summary collapse
-
#eval(*arguments) ⇒ Object
Execute a Lua script server side.
-
#evalsha(*arguments) ⇒ Object
Execute a Lua script server side.
-
#script_debug(*arguments) ⇒ Object
Set the debug mode for executed scripts.
-
#script_exists(*arguments) ⇒ Object
Check existence of scripts in the script cache.
-
#script_flush(*arguments) ⇒ Object
Remove all the scripts from the script cache.
-
#script_kill(*arguments) ⇒ Object
Kill the script currently in execution.
-
#script_load(*arguments) ⇒ Object
Load the specified Lua script into the script cache.
Instance Method Details
#eval(*arguments) ⇒ Object
Execute a Lua script server side. Depends on the script that is executed.
33 34 35 |
# File 'lib/protocol/redis/methods/scripting.rb', line 33 def eval(*arguments) call("EVAL", *arguments) end |
#evalsha(*arguments) ⇒ Object
Execute a Lua script server side. Depends on the script that is executed.
43 44 45 |
# File 'lib/protocol/redis/methods/scripting.rb', line 43 def evalsha(*arguments) call("EVALSHA", *arguments) end |
#script_debug(*arguments) ⇒ Object
Set the debug mode for executed scripts. O(1).
50 51 52 |
# File 'lib/protocol/redis/methods/scripting.rb', line 50 def script_debug(*arguments) call("SCRIPT DEBUG", *arguments) end |
#script_exists(*arguments) ⇒ Object
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).
57 58 59 |
# File 'lib/protocol/redis/methods/scripting.rb', line 57 def script_exists(*arguments) call("SCRIPT EXISTS", *arguments) end |
#script_flush(*arguments) ⇒ Object
Remove all the scripts from the script cache. O(N) with N being the number of scripts in cache.
63 64 65 |
# File 'lib/protocol/redis/methods/scripting.rb', line 63 def script_flush(*arguments) call("SCRIPT FLUSH", *arguments) end |
#script_kill(*arguments) ⇒ Object
Kill the script currently in execution. O(1).
69 70 71 |
# File 'lib/protocol/redis/methods/scripting.rb', line 69 def script_kill(*arguments) call("SCRIPT KILL", *arguments) end |
#script_load(*arguments) ⇒ Object
Load the specified Lua script into the script cache. O(N) with N being the length in bytes of the script body.
76 77 78 |
# File 'lib/protocol/redis/methods/scripting.rb', line 76 def script_load(*arguments) call("SCRIPT LOAD", *arguments) end |