lib/cached_resource/configuration.rb in cached_resource-5.2.0 vs lib/cached_resource/configuration.rb in cached_resource-5.3.0
- old
+ new
@@ -20,21 +20,23 @@
# :ttl_randomization, default: false,
# :ttl_randomization_scale, default: 1..2,
# :collection_synchronize, default: false,
# :collection_arguments, default: [:all]
# :cache, default: Rails.cache or ActiveSupport::Cache::MemoryStore.new,
- # :logger, default: Rails.logger or ActiveSupport::Logger.new(NilIO.new)
+ # :logger, default: Rails.logger or ActiveSupport::Logger.new(NilIO.new),
+ # :cache_collections, default: true
def initialize(options={})
super({
:enabled => true,
:race_condition_ttl => 86400,
:ttl => 604800,
:ttl_randomization => false,
:ttl_randomization_scale => 1..2,
:collection_synchronize => false,
:collection_arguments => [:all],
:cache => defined?(Rails.cache) && Rails.cache || CACHE,
- :logger => defined?(Rails.logger) && Rails.logger || LOGGER
+ :logger => defined?(Rails.logger) && Rails.logger || LOGGER,
+ :cache_collections => true
}.merge(options))
end
# Determine the time until a cache entry should expire. If ttl_randomization
# is enabled, then a the set ttl will be multiplied by a random
\ No newline at end of file