lib/cached_resource/configuration.rb in cached_resource-4.2.0 vs lib/cached_resource/configuration.rb in cached_resource-5.0.0
- old
+ new
@@ -4,16 +4,12 @@
class Configuration < OpenStruct
# default or fallback cache without rails
CACHE = ActiveSupport::Cache::MemoryStore.new
- # default of fallback logger without rails
- LOGGER = if defined?(ActiveSupport::Logger)
- ActiveSupport::Logger.new(NilIO.instance)
- else
- ActiveSupport::BufferedLogger.new(NilIO.instance)
- end
+ # default or fallback logger without rails
+ LOGGER = ActiveSupport::Logger.new(NilIO.instance)
# prefix for log messages
LOGGER_PREFIX = "[cached_resource]"
# Initialize a Configuration with the given options, overriding any
@@ -24,10 +20,10 @@
# :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::BufferedLogger.new(NilIO.new)
+ # :logger, default: Rails.logger or ActiveSupport::Logger.new(NilIO.new)
def initialize(options={})
super({
:enabled => true,
:race_condition_ttl => 86400,
:ttl => 604800,
\ No newline at end of file