lib/picky/backends/redis/list.rb in picky-4.12.8 vs lib/picky/backends/redis/list.rb in picky-4.12.10

- old
+ new

@@ -36,30 +36,30 @@ # Writes the hash into Redis. # def dump hash unless @realtime clear - # client.pipelined do - hash.each_pair do |key, values| - redis_key = "#{namespace}:#{key}" - i = 0 - values.each do |value| - i += 1 - client.zadd redis_key, i, value - end + hash.each_pair do |key, values| + redis_key = "#{namespace}:#{key}" + i = 0 + values.each do |value| + i += 1 + client.zadd redis_key, i, value end - # end + end end end # Get a collection. # # Internal API method for the index. # def [] key list = client.zrange "#{namespace}:#{key}", :'0', :'-1' + DirectlyManipulable.make self, list, key + list end # Set a single list. # @@ -70,11 +70,12 @@ i = 0 values.each do |value| i += 1 client.zadd redis_key, i, value end - + DirectlyManipulable.make self, values, key + values end end \ No newline at end of file