Sha256: f28b9f4e68cc740e6e05e19c347a04b89d50f49ba00d71aa5d888bc068422ff2
Contents?: true
Size: 699 Bytes
Versions: 6
Compression:
Stored size: 699 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, :clear, :empty? def initialize(adapter, 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
6 entries across 6 versions & 1 rubygems