Module: ActiveSupport::Cache::MemoryStore::DupCoder

Extended by:
DupCoder
Included in:
DupCoder
Defined in:
activesupport/lib/active_support/cache/memory_store.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#dump(entry) ⇒ Object



30
31
32
33
# File 'activesupport/lib/active_support/cache/memory_store.rb', line 30

def dump(entry)
  entry.dup_value! unless entry.compressed?
  entry
end

#dump_compressed(entry, threshold) ⇒ Object



35
36
37
38
39
# File 'activesupport/lib/active_support/cache/memory_store.rb', line 35

def dump_compressed(entry, threshold)
  entry = entry.compressed(threshold)
  entry.dup_value! unless entry.compressed?
  entry
end

#load(entry) ⇒ Object



41
42
43
44
45
# File 'activesupport/lib/active_support/cache/memory_store.rb', line 41

def load(entry)
  entry = entry.dup
  entry.dup_value!
  entry
end