Sha256: 048a31e8ba9075566abccc8a83b713b105550993fa39ca6f2a604d82ca372585
Contents?: true
Size: 937 Bytes
Versions: 5
Compression:
Stored size: 937 Bytes
Contents
require 'looksist/version' require 'looksist/hash' require 'jsonpath' require 'looksist/common' require 'looksist/core' require 'looksist/redis_service' require 'looksist/hashed' require 'looksist/safe_lru_cache' module Looksist extend ActiveSupport::Concern include Core include Hashed class << self attr_accessor :lookup_store, :driver, :cache_buffer_size, :redis_service, :l2_cache 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 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 end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
looksist-0.3.12 | lib/looksist.rb |
looksist-0.3.11 | lib/looksist.rb |
looksist-0.3.10 | lib/looksist.rb |
looksist-0.3.9 | lib/looksist.rb |
looksist-0.3.8 | lib/looksist.rb |