lib/ductr.rb in ductr-0.2.2 vs lib/ductr.rb in ductr-0.2.3
- old
+ new
@@ -96,14 +96,18 @@
# The Ductr store, used to share information across different instances.
#
# @return [ActiveSupport::Cache::Store] The store instance
#
def store
+ adapter = config.store_adapter
+ params = config.store_parameters
+ options = config.store_options
+
@store ||= \
- if config.store_adapter.is_a? Class
- config.store_adapter.new(*config.store_parameters)
+ if adapter.is_a? Class
+ adapter.new(*params, **options)
else
- ActiveSupport::Cache.lookup_store(config.store_adapter, *config.store_parameters)
+ ActiveSupport::Cache.lookup_store(adapter, *params, **options)
end
end
end
end