instance method dump_compressed

Ruby on Rails 7.0.10

Since v7.0.10 Last seen in v7.0.10

Signature

dump_compressed(entry, threshold)

No documentation comment.

Parameters

entry req
threshold req
Source
# File activesupport/lib/active_support/cache.rb, line 895
        def dump_compressed(entry, threshold)
          payload = Marshal.dump(entry.pack)
          if payload.bytesize >= threshold
            compressed_payload = Zlib::Deflate.deflate(payload)
            if compressed_payload.bytesize < payload.bytesize
              return MARK_70_COMPRESSED + compressed_payload
            end
          end

          MARK_70_UNCOMPRESSED + payload
        end

Defined in activesupport/lib/active_support/cache.rb line 895 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Cache::Coders::Rails70Coder

Type at least 2 characters to search.

↑↓ navigate · open · esc close