| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
`#fetch_multi` in case did not cache hit, to write a cache using the block value.
https://github.com/rails/rails/blob/master/activesupport/lib/active_support/cache.rb#L383..L384
Therefore, block is a need to pass always, I think should check first.
|
|\
| |
| | |
Remove duplicate test.
|
| |
| |
| |
| |
| | |
We already test similar stuff in `test_really_long_keys` so removing
this extra and duplicated test.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|\ \
| | |
| | | |
Add missing tests for memory store of cache.
|
| |/ |
|
|/
|
|
|
| |
Add missing test for clearing up local cache and check response should
be present on invalid parameters error.
|
|
|
|
| |
Require 'pathname' explicitly
|
|\
| |
| |
| | |
Fix forced cache miss for fetch when called without a block.
|
|/
|
|
|
|
| |
- Raised an argument error if no block is passed to #fetch with
'force: true' option is set.
- Added tests for the same.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reevaluating the log output generated from this instrumentation,
we've found that it wasn't all that useful in practice.
```
Caches multi read:
- views/david/2/4184ab71db6849621a4d8820fcd2c0ad
- views/david/2/4184ab71db6849621a4d8820fcd2c0ad
- views/david/3/4184ab71db6849621a4d8820fcd2c0ad
- views/david/3/4184ab71db6849621a4d8820fcd2c0ad
```
If rendering many templates the output is inscrutable, and it's impossible
to see how many cache misses there were.
Revert ca6aba7f30 and implement a better way later.
|
|\
| |
| | |
Allow to store .keep file in cache directory
|
| | |
|
| |
| |
| |
| |
| | |
Suppress warning (warning: ambiguous first argument; put
parentheses or a space even after `/' operator)
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes https://github.com/rails/rails/issues/22477.
When I improved the caching instrumentation in
edd33c08d98723ae9bb89cf7f019277117ed6414, I inadvertently changed the
order of AS notifications when there is a cache miss.
|
| | |
|
|/
|
|
| |
this themselves
|
|
|
|
|
|
| |
fetch is supposed to behave differently, this was a mistake merged in
https://github.com/rails/rails/pull/22194
|
|\
| |
| | |
cache nil replies from backend cache so misses are fast too
|
| | |
|
|\ \
| | |
| | | |
When testing cache issues, it is useful to log the actual key, including namespace
|
| | |
| | |
| | |
| | | |
full key that actually used by the underline cache implementation
|
|\ \ \
| | | |
| | | | |
FileStore: Long cache keys may result in too long paths due to encoding
|
| | | | |
|
| |_|/
|/| | |
|
| | | |
|
| |/
|/| |
|
| | |
|
|/
|
|
|
| |
Minitest sets an E constant to an empty string to save GC time.
This clashes with autoloading tests which define an E constant.
|
|
|
|
|
|
| |
Currently `Rails.cache.clear` raises Errno::ENOENT if it's run just
after cloning a new Rails project. It should succeed without removing
files or directories.
|
|
|
|
| |
an issue with the redis cache, where this code will sometimes throw an error out of SETEX when passing 0 as the `expires_at`.
|
| |
|
|
|
|
| |
[Robin Dupret + Rafael Mendonça França]
|
|
|
|
|
|
|
|
|
|
| |
Adds `read_multi` instrumentation formatted as:
Caches multi read:
- views/david/2/4184ab71db6849621a4d8820fcd2c0ad
- views/david/2/4184ab71db6849621a4d8820fcd2c0ad
- views/david/3/4184ab71db6849621a4d8820fcd2c0ad
- views/david/3/4184ab71db6849621a4d8820fcd2c0ad
|
|
|
|
|
|
|
|
|
| |
This code was there just to convert entries generated in Rails
4.0.0.beta1 applications to a supported format.
It is almost unlikely that any existent application have this cache
entry format in their caches at the point that Rails 5 will be released
so we don't need this code anymore.
|
|
|
|
|
|
|
| |
We should convert when @v is defined not @value.
The test was calling value first that already converts the entry so we
are not catching this bug.
|
|
|
|
| |
Otherwise, it's possible for GC to run in between, and fail the test.
|
| |
|
| |
|
|
|
|
|
|
|
| |
The current implementation of `fetch_multi` returns an array and has no
means to easily backtrack which names yielded which results. By changing
the return value to a Hash we retain the name information. Hash#values
can be used on the response if only the values are needed.
|
|
|
|
|
|
|
|
| |
fixes #13547
The body may use the local cache during rendering. `call`ing the app
doesn't mean that rendering is finished, so we need to wait until
`close` is called on the body.
|
|
|
|
|
|
| |
:mem_cache_store should receive a list of hosts or a dalli client,
otherwise raise it.
Also adding a changelog.
|
|
|
|
|
|
|
| |
:mem_cache_store require dalli, rescue Dalli exceptions, and follow Dalli API.
Memcached gem, for instance, doesnt work anymore, as the API are different.
As we already require one client, we should make sure that client works, and not accept others, and if someone wants to use another memcache client they can write their own store adapter.
|
|\
| |
| |
| |
| |
| |
| |
| | |
support :unless_exist for FileCache
Conflicts:
activesupport/CHANGELOG.md
activesupport/test/caching_test.rb
|
| | |
|