| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This moves digest calculation cache on to the details key object.
Before, the digest cache was a class level ivar, and one of the keys was
the hash value of the details key object:
https://github.com/rails/rails/blob/13c4cc3b5aea02716b7459c0da641438077f5236/actionview/lib/action_view/digestor.rb#L28
An object's hash value is not unique, so it's possible for this cache
key to produce colliding keys with no resolution. This commit move
cache on to the details key object itself, so we know that the digests
are always unique per details key object.
|
|
|
|
|
|
|
| |
this lets us leverage Ruby's kwarg handling (exceptions for missing
params, etc) ASAP which allows us to skip active support method calls
and make sure the exception stack is closer to where the user called the
methods.
|
|
|
|
|
| |
we can use kwargs in this case to avoid values_at and except calls on
the options hash
|
|
|
|
| |
Wasn't removed in 57ac777.
|
| |
|
| |
|
|
|
|
| |
then we can stop scattering nil checks (e.g. `try`) through the class.
|
| |
|
|
|
|
|
|
|
| |
The thread_safe gem is being deprecated and all its code has been merged
into the concurrent-ruby gem. The new class, Concurrent::Map, is exactly
the same as its predecessor except for fixes to two bugs discovered
during the merge.
|
| |
|
|
|
|
|
|
| |
Avoid computing the same fragment digest many times when looping over templates.
The cache is cleared on every request so template changes are still picked up.
|
|\
| |
| |
| |
| | |
Conflicts:
guides/source/configuring.md
|
| |
| |
| |
| | |
LookupContext is class name
|
|/
|
|
| |
cache_digests:dependency and cache_digests:nested_dependency tasks
|
| |
|
|
|
|
| |
variant -- trying to pass it back in makes a mess of things (oh, and doesnt work)
|
| |
|
|
|
|
| |
testing!!
|
| |
|
| |
|
|
|
|
|
| |
Before we had a bug in the resolver cache so the disable_cache were not
working when passing options to find
|
|
|
|
| |
finder object
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Related to: #14242 #14243 14293
Variants passed to LookupContext#find() seem to be ignored, so
I've used the setter instead: `finder.variants = [ variant ]`.
I've also added some more test cases for variants. Hopefully this
time passing tests will mean it actually works.
|
|
|
|
|
|
|
|
|
|
|
| |
Take variants into account when calculating template digests in
ActionView::Digest.
Digestor#digest now takes a hash as an argument to support variants and
allow more flexibility in the future. Old-style arguments have been
deprecated.
Fixes #14242
|
|
|
|
| |
cleanup works correctly
|
| |
|
|
|
|
| |
ActionView::Resolver.caching = false.
|
|
|
|
|
|
| |
Since the lookup details will influence which template is resolved, they
need to be included in the cache key -- otherwise two different
templates may erroneously share the same digest value.
|
|
|
|
|
|
| |
since ActionView::Resolver.caching is set to the same value as config.cache_template_loading
only cache template digests if config.cache_template_loading is not falsy
fixes issues #10752 and #10791
|
|
|
|
|
| |
This fixes potential thread safety issues introduced in 09f6fe1. The problem
with the original code was that the "recursion-stopping" `nil` values could
be seen by other threads.
|
|
|
|
|
|
|
| |
When rendering recursive partial Action View is trying to generate the
view digest infinitly causing a stack level error.
Fixes #11340
|
|
|