Methods
- #
- D
Included Modules
Constants
| MARK_COMPRESSED | = | "\x01".b.freeze |
| MARK_UNCOMPRESSED | = | "\x00".b.freeze |
Instance Public methods
_dump(entry) Link
Source: show
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 162 def _dump(entry) MARK_UNCOMPRESSED + Marshal.dump(entry.pack) end
_load(marked) Link
Source: show
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 175 def _load(marked) dumped = marked.byteslice(1..-1) dumped = decompress(dumped) if marked.start_with?(MARK_COMPRESSED) Cache::Entry.unpack(Marshal.load(dumped)) end
dump_compressed(entry, threshold) Link
Source: show
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 166 def dump_compressed(entry, threshold) dumped = Marshal.dump(entry.pack) if compressed = try_compress(dumped, threshold) MARK_COMPRESSED + compressed else MARK_UNCOMPRESSED + dumped end end