class method
self.new
Ruby on Rails 8.0.4
Since v2.2.3Signature
self.new(options = nil)
No documentation comment.
Parameters
-
optionsopt = nil
Source
# File activesupport/lib/active_support/cache/memory_store.rb, line 73
def initialize(options = nil)
options ||= {}
options[:coder] = DupCoder unless options.key?(:coder) || options.key?(:serializer)
# Disable compression by default.
options[:compress] ||= false
super(options)
@data = {}
@max_size = options[:size] || 32.megabytes
@max_prune_time = options[:max_prune_time] || 2
@cache_size = 0
@monitor = Monitor.new
@pruning = false
end
Defined in activesupport/lib/active_support/cache/memory_store.rb line 73
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Cache::MemoryStore