23 lines
328 B
Ruby
Raw Normal View History

require "redis"
class Redis
class Pipeline < Redis
BUFFER_SIZE = 50_000
def initialize(redis)
@redis = redis
@commands = []
end
2009-06-10 00:11:17 +02:00
def call_command(command)
@commands << command
2009-06-10 00:08:10 +02:00
end
2009-06-10 00:11:17 +02:00
def execute
@redis.call_command(@commands)
@commands.clear
end
end
2009-05-26 18:10:50 +02:00
end