Flowdock
method

should_compress?

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActiveSupport::Cache::Entry

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.1.7) is shown here.

should_compress?(value, options) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/cache.rb, line 670
        def should_compress?(value, options)
          if value && options[:compress]
            compress_threshold = options[:compress_threshold] || DEFAULT_COMPRESS_LIMIT
            serialized_value_size = (value.is_a?(String) ? value : Marshal.dump(value)).bytesize

            return true if serialized_value_size >= compress_threshold
          end

          false
        end
Register or log in to add new notes.