Sha256: 7abc647d8c4c6b464d4b2035fd7f18724a0e9d4063eaf77c501408e3c0b1a136

Contents?: true

Size: 333 Bytes

Versions: 5

Compression:

Stored size: 333 Bytes

Contents

class Redis
  class Pipeline < Client
    BUFFER_SIZE = 50_000

    def initialize(redis)
      @redis = redis
      @commands = []
    end

    def call_command(command)
      @commands << command
    end

    def execute
      return if @commands.empty?
      @redis.call_command(@commands)
      @commands.clear
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
redis-1.0.4 lib/redis/pipeline.rb
redis-1.0.3 lib/redis/pipeline.rb
redis-1.0.2 lib/redis/pipeline.rb
redis-1.0.1 lib/redis/pipeline.rb
redis-1.0.0 lib/redis/pipeline.rb