instance method dump_compressed

Ruby on Rails 8.1.2

Since v7.1.6

Available in: v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

dump_compressed(entry, threshold)

No documentation comment.

Parameters

entry req
threshold req
Source
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 77
          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 77 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback

Type at least 2 characters to search.

↑↓ navigate · open · esc close