Module: ActiveSupport::Cache::MemoryStore::DupCoder
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#dump(entry) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/active_support/cache/memory_store.rb', line 32 def dump(entry) if entry.value && entry.value != true && !entry.value.is_a?(Numeric) Cache::Entry.new(dump_value(entry.value), expires_at: entry.expires_at, version: entry.version) else entry end end |
#dump_compressed(entry, threshold) ⇒ Object
40 41 42 43 |
# File 'lib/active_support/cache/memory_store.rb', line 40 def dump_compressed(entry, threshold) compressed_entry = entry.compressed(threshold) compressed_entry.compressed? ? compressed_entry : dump(entry) end |