Sha256: 9434a1e2d18b35f14965ee59bce88b1a0725d50f2142227365340490692996c7
Contents?: true
Size: 730 Bytes
Versions: 8
Compression:
Stored size: 730 Bytes
Contents
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, :get_batch, :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
8 entries across 8 versions & 1 rubygems