| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test case for fetch cache miss with skip_nil
* abondon nil cache if skip_nil specified
* ensure not cache key for skip nil
* add document with skip_nil for Store#fetch
* add a new change log entry for #25437
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use attr_reader/attr_writer instead of methods
method is 12% slower
Use flat_map over map.flatten(1)
flatten is 66% slower
Use hash[]= instead of hash.merge! with single arguments
merge! is 166% slower
See https://github.com/rails/rails/pull/32337 for more conversation
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Firstly, increment and decrement shouldn't care about the particulars of
key expiry. They should only know that they have to pass that responsibility
on to somewhere else.
Secondly, it moves the key normalization back inside the instrumentation like
it was originally. I think that matches the original design intention or at
the very least it lets users catch haywire key truncation.
Thirdly, it moves the changelog entry to the top of the file, where new entries
go. I couldn't understand what the entry was saying so I tried to rewrite it.
|
| |
|
| |
|
|
|
|
| |
Follow up of #32605.
|
|
|
|
| |
when connection_pool is not installed.
|
|
|
|
|
|
|
|
|
| |
This commit fix pattern of filenames for `CustomCops/AssertNot` and
`CustomCops/RefuteNot`.
rubocop should check every file under `test/`.
Related to #32441, #32605
|
|
|
|
|
| |
This autocorrects the violations after adding a custom cop in
3305c78dcd.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ruby 2.6.0 warns about this.
``` ruby -v
ruby 2.6.0dev (2018-04-04 trunk 63085) [x86_64-linux]
```
Before, see:
https://travis-ci.org/rails/rails/jobs/365740163#L1262-L1264
https://travis-ci.org/rails/rails/jobs/365944863#L2121-L2174
|
|
|
|
|
|
|
|
|
|
| |
Namespace not working in RedisCacheStore#clear method. Bacause
namespace = merged_options(options)[namespace]
is always nil, Correct is
namespace = merged_options(options)[:namespace]
|
|
|
|
|
|
|
|
|
|
| |
`SecureRandom.byes` was added in Ruby 2.4. So, 5-2-stable build is broken
because using `SecureRandom.bytes`.
https://travis-ci.org/rails/rails/jobs/365740667
Also, `SecureRandom.byes` seems to an undocumented method.
If need random binary strings, should use `SecureRandom.random_bytes`.
https://github.com/ruby/ruby/blob/trunk/lib/securerandom.rb
|
|
|
|
| |
(See previous commit for a description of the issue)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
It should returns raw value, not instance of `ActiveSupport::Cache::Entry`.
|
|
|
|
|
|
|
|
| |
Since `Redis#call` duck types as a Proc, we'd call `#call` on it,
thinking it's a Proc. Fixed by check for the Proc explicitly instead of
duck typing on `#call`.
References #32233
|
|
|
|
| |
Since Rails 6 requires Ruby 2.4.1+.
|
|
|
|
|
| |
Fixes #31909.
Closes #31911.
|
|\
| |
| |
| | |
Add support for connection pooling on RedisCacheStore
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
Closes #31886
Fixes #31884
|
|
|
|
|
| |
This reverts commit ac74e2c521f6ddc0eac02d74a1313261bcc1d60f, reversing
changes made to ffdb06136152b3c5f7f4a93ca5928e16e755d228.
|
|
|
|
|
| |
This suppresses `Timeout::Error` exceptions.
Ref: https://travis-ci.org/rails/rails/jobs/334622442#L1089-L1110
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
config
|
| |
|
| |
|
|
|
|
| |
Update the long key handling test so it triggers truncation in the Redis cache store.
|
|
|
|
| |
currently it's not possible to know what the hit rates are from read_multi
|
| |
|
|
|
|
| |
Follow up of #31432.
|
|
|
|
|
|
|
| |
Support `expires_in` in `ActiveSupport::Cache::MemCacheStore#increment`
and `#decrement`.
Closes #30716.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
* Supports vanilla Redis, hiredis, and Redis::Distributed.
* Supports Memcached-like sharding across Redises with Redis::Distributed.
* Fault tolerant. If the Redis server is unavailable, no exceptions are
raised. Cache fetches are treated as misses and writes are dropped.
* Local cache. Hot in-memory primary cache within block/middleware scope.
* `read_/write_multi` support for Redis mget/mset. Use Redis::Distributed
4.0.1+ for distributed mget support.
* `delete_matched` support for Redis KEYS globs.
|
|
|
|
| |
cleaning up the expired cache keys
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
|\
| |
| |
| | |
Enforce frozen string in Rubocop
|
| | |
|
|/
|
|
|
|
|
| |
The ActiveSupport test suite only passes currently if it uses the latest unreleased commits for dalli, and a patch for Builder:
https://github.com/tenderlove/builder/pull/6
Beyond that, all external dependencies (at least, to the extent they’re used by ActiveSupport) are happy, including Nokogiri as of 1.8.0.
|