Sha256: c3e5e35ce659fe9adc8913255ec0c0be9dba772eaa9ab7ed70497e6f22c73e49
Contents?: true
Size: 749 Bytes
Versions: 31
Compression:
Stored size: 749 Bytes
Contents
require 'forwardable' module SplitIoClient module Cache module Repositories # Repository which forwards impressions interface to the selected adapter class ImpressionsRepository < Repository extend Forwardable def_delegators :@adapter, :add, :add_bulk, :clear, :empty? def initialize(adapter, config) @config = config @adapter = case adapter.class.to_s when 'SplitIoClient::Cache::Adapters::MemoryAdapter' Repositories::Impressions::MemoryRepository.new(adapter, config) when 'SplitIoClient::Cache::Adapters::RedisAdapter' Repositories::Impressions::RedisRepository.new(adapter, config) end end end end end end
Version data entries
31 entries across 31 versions & 1 rubygems