module ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback

def dump_compressed(entry, threshold)

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