diff options
author | Matthew Draper <matthew@trebex.net> | 2016-10-03 01:34:27 +1030 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2016-10-03 13:35:51 +1030 |
commit | e8b36e7711d44bf23a39426b3d766c08528573b3 (patch) | |
tree | b9c6b801df7cf50c3902cb5c50dbe22089dc3837 /actionview/lib/action_view | |
parent | 7b63f56ce0c708f05db31de04b8cd2dc6e4ef96b (diff) | |
download | rails-e8b36e7711d44bf23a39426b3d766c08528573b3.tar.gz rails-e8b36e7711d44bf23a39426b3d766c08528573b3.tar.bz2 rails-e8b36e7711d44bf23a39426b3d766c08528573b3.zip |
Avoid bumping the class serial when invoking executor
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/digestor.rb | 6 | ||||
-rw-r--r-- | actionview/lib/action_view/railtie.rb | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/actionview/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb index 2d6ad8f6d9..0658d8601d 100644 --- a/actionview/lib/action_view/digestor.rb +++ b/actionview/lib/action_view/digestor.rb @@ -6,6 +6,12 @@ module ActionView class Digestor @@digest_mutex = Mutex.new + module PerExecutionDigestCacheExpiry + def self.before(target) + ActionView::LookupContext::DetailsKey.clear + end + end + class << self # Supported options: # diff --git a/actionview/lib/action_view/railtie.rb b/actionview/lib/action_view/railtie.rb index dfb99f4ea9..42795ca2c7 100644 --- a/actionview/lib/action_view/railtie.rb +++ b/actionview/lib/action_view/railtie.rb @@ -40,7 +40,7 @@ module ActionView initializer "action_view.per_request_digest_cache" do |app| ActiveSupport.on_load(:action_view) do if app.config.consider_all_requests_local - app.executor.to_run { ActionView::LookupContext::DetailsKey.clear } + app.executor.to_run ActionView::Digestor::PerExecutionDigestCacheExpiry end end end |