module Looksist
Attributes
cache_buffer_size[RW]
driver[RW]
l2_cache[RW]
lookup_store[RW]
redis_service[RW]
Public Class Methods
bucket_dump(entity)
click to toggle source
# File lib/looksist.rb, line 29 def bucket_dump(entity) keys = Looksist.lookup_store.keys("#{entity.pluralize}*") values = Looksist.redis_service.send("#{entity}_for", keys.collect{|i| i.split('/').last}) Hash[(keys.collect {|i| i.split('/').last}).zip(values)] end
configure() { |self| ... }
click to toggle source
# File lib/looksist.rb, line 21 def configure yield self self.redis_service = Looksist::RedisService.instance do |lookup| lookup.client = self.lookup_store lookup.buffer_size = (self.l2_cache == :no_cache) ? 0 : (self.cache_buffer_size || 50000) end end