instance method
dump_compressed
Ruby on Rails 7.1.6
Since v7.1.6Signature
dump_compressed(entry, threshold)
No documentation comment.
Parameters
-
entryreq -
thresholdreq
Source
# 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
Defined in activesupport/lib/active_support/cache/serializer_with_fallback.rb line 99
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback