1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

8 commits

Author SHA1 Message Date
Ryuta Kamizono
1dc17e7b2e Fix CustomCops/AssertNot to allow it to have failure message
Follow up of #32605.
2018-05-13 11:32:47 +09:00
Godfrey Chan
84b1feeaff Add failing test for compression bug
On Rails 5.2, when compression is enabled (which it is by default),
the actual value being written to the underlying storage is actually
_bigger_ than the uncompressed raw value.

This is because the `@marshaled_value` instance variable (typically)
gets serialized with the entry object, which is then written to the
underlying storage, essentially double-storing every value (once
uncompressed, once possibly compressed).

This regression was introduced in #32254.
2018-04-11 21:43:51 -07:00
Jeremy Daer
ed10016687 Cache: Enable compression by default for values > 1kB.
Compression has long been available, but opt-in and at a 16kB threshold.
It wasn't enabled by default due to CPU cost. Today it's cheap and
typical cache data is eminently compressible, such as HTML or JSON
fragments.

Compression dramatically reduces Memcached/Redis mem usage, which means
the same cache servers can store more data, which means higher hit
rates.

To disable compression, pass `compress: false` to the initializer.
2017-11-13 22:02:45 -07:00
Koichi ITO
ac717d65a3 [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
Kir Shatrov
72950568dd Use frozen-string-literal in ActiveSupport 2017-07-09 15:08:29 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Jeremy Daer
ddea316425
Split up the cache test suite so it's easier to understand and extend (#29404)
Split up the caching tests as prep for adding a new cache store. Slices
the mega test/caching_test.rb into behavior modules, concrete store
tests, and cross-cutting store tests.

Considering moving cache store behavior modules into lib/ so they may be
used for acceptance testing by third parties.
2017-06-10 01:23:10 -07:00