method
dump_compressed
rails latest stable - Class:
ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback
dump_compressed(entry, threshold)public
No documentation available.
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 99
def dump_compressed(entry, threshold)
dumped = Marshal.dump(entry.pack)
if dumped.bytesize >= threshold
compressed = Zlib::Deflate.deflate(dumped)
return MARK_COMPRESSED + compressed if compressed.bytesize < dumped.bytesize
end
MARK_UNCOMPRESSED + dumped
end