method
try_compress
v8.0.0 -
Show latest stable
- Class:
ActiveSupport::Cache::Coder
try_compress(string, threshold)private
No documentation available.
# File activesupport/lib/active_support/cache/coder.rb, line 129
def try_compress(string, threshold)
if @compressor && string.bytesize >= threshold
compressed = @compressor.deflate(string)
compressed if compressed.bytesize < string.bytesize
end
end