Module: ActiveMatrix::Util::Tinycache::InstanceMethods

Defined in:
lib/active_matrix/util/tinycache.rb

Instance Method Summary collapse

Instance Method Details

#tinycache_adapterObject



39
40
41
42
43
44
# File 'lib/active_matrix/util/tinycache.rb', line 39

def tinycache_adapter
  @tinycache_adapter ||= Tinycache.adapter.new.tap do |adapter|
    adapter.config = self.class.tinycache_adapter_config if adapter.respond_to? :config=
    adapter.client = client if respond_to?(:client) && adapter.respond_to?(:client=)
  end
end