| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
All actionview caches are already cleared at the start of each request
(when Resolver.caching is false) by PerExecutionDigestCacheExpiry, which
calls LookupContext::DetailsKey.clear (which clears all caches).
Because caches are always cleared per-request in dev, we shouldn't need
this extra logic to compare mtimes and conditionally reload templates.
This should make templates slightly faster in development (particularly
multiple renders of the same template)
|
|
|
|
|
|
|
| |
Templates only have one format. Before this commit, templates would be
constructed with a single element array that contained the format. This
commit eliminates the single element array and just implements a
`format` method. This saves one array allocation per template.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit passes the template format to the digestor in order to come
up with a key. Before this commit, the digestor would depend on the
side effect of the template renderer setting the rendered_format on the
lookup context. I would like to remove that mutation, so I've changed
this to pass the template format in to the digestor.
I've introduced a new instance variable that will be alive during a
template render. When the template is being rendered, it pushes the
current template on to a stack, setting `@current_template` to the
template currently being rendered. When the cache helper asks the
digestor for a key, it uses the format of the template currently on the
stack.
|
| |
|
|
|
|
| |
`FixtureTemplate` is no longer used since 3d7892d.
|
| |
|
|
|
|
|
| |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| |
|
|
|
|
|
|
| |
".. with __dir__ we can restore order in the Universe." - by @fxn
Related to 5b8738c2df003a96f0e490c43559747618d10f5f
|
|
|
|
|
| |
`'#{name}' file doesn't exist, so no dependencies` was removed in
bb04814.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
for other formats
|
| |
|
|
|
|
| |
non-default (html) template
|
|
|
|
| |
paths correctly
|
|
|
|
| |
format other than the first default
|
|
|
|
| |
Will be using this in later code.
|
|
|
|
|
| |
Each test executes in another tmp folder, so there's no chance
of polluting another test run.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* master: (113 commits)
remove useless method
Updated file documentation [ci skip]
changes caching guide to add note on weak etags
Don't put config.action_mailer.perform_caching entry twice in development.rb
Fix wording and wrong reference
Add Ruby formatting to CHANGELOG entry
Fix ActionView's cache section reference
Do not define methods in the included block
Add caching guide in ActionMailer basics
Add ActionMailer configuration options
Preparing for 5.0.0.beta3 release
Update 5.0 release notes
Enable tmp_restart plugin for puma
Prep release for Rails 5 beta3
[ci skip] Move collection caching changelog entry.
Ensure `drop_table` even if tests failure or interrupted
:bomb: run the test @rafaelfranca :angry:
Remove changelog entry for reverted commit
Add CHANGELOG for https://github.com/rails/rails/pull/23734 [ci skip]
No need CHANGELOG entry for #23849.
...
|
| |
| |
| |
| |
| | |
otherwise we don't get the log messages we're looking for and the tests
fail intermittently.
|
| |
| |
| |
| |
| |
| | |
Only the root node has injected dependencies, so we don't need to care
about them at lower levels. This change pushes the injected
dependencies up to where the user passed them in.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
this is for backwards compatibility. We should remove this after
5-0-stable is created because digest calculation should be amortized.
Caching digests of subtrees will speed up digests for other trees that
share the same children. However, this will also increase memory, and
after the app warms up, then those subtrees will never be reused which
means that memory is wasted.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* master: (27 commits)
move digest cache on to the DetailsKey object
remove object `hash` cache
[ci skip] fix suggested change-replace 'an' with 'the in Rails engine guide'
Missing documentation about hash algorithm option for MessageVerifier [ci skip]
set `skip_listen` option to dummy appplication
Fix the language in engines guide
Add accidentally removed `#` [ci skip]
fields_for_style needs to test for AC::Parameters
Fix indentation for code block in changelog
Remove accidentally duplicated change log title [ci skip]
partially revert 69009f4473637a44ade26d954ef5ddea6ff903f2
Remove needless `case_insensitive_comparison` in mysql2 adapter
modify to `error` also abort when specify fail fast option
Implement ActionController::Parameters#inspect
remove unused method
Remove unused Journey code
Add Action Cable CHANGELOG in release notes [ci skip]
Show proper error message when a non-relation object is passed to AR::Relation#or
Fix semantics of test names for finish option in batches_test
Fix typo
...
Conflicts:
actionview/lib/action_view/digestor.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
also remove the EMPTY node since we won't need it
|
|/
|
|
| |
also add an EMPTY sentinel node
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This will ensure that the digestor stays in parity with the
LookupContext object.
|
|
|
|
| |
in the case of failure it is nice to see what the two digests are.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
| |
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.
|