aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/cache_helper.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-06-07 22:17:34 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2017-06-08 21:42:46 +0200
commit8240636beda7b2b487217be1d945eb0d36145c4d (patch)
treef24476653fdb7dd0ed43bf602d7068af1a4b0dbc /actionview/lib/action_view/helpers/cache_helper.rb
parent2abf6ca0c8304a3cfcdae6e14060b561780be43c (diff)
downloadrails-8240636beda7b2b487217be1d945eb0d36145c4d.tar.gz
rails-8240636beda7b2b487217be1d945eb0d36145c4d.tar.bz2
rails-8240636beda7b2b487217be1d945eb0d36145c4d.zip
Merge pull request https://github.com/rails/rails/pull/28637 from st0012/fix-partial-cache-logging
Diffstat (limited to 'actionview/lib/action_view/helpers/cache_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/cache_helper.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/actionview/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb
index dfa0956fe2..d515556e23 100644
--- a/actionview/lib/action_view/helpers/cache_helper.rb
+++ b/actionview/lib/action_view/helpers/cache_helper.rb
@@ -214,8 +214,6 @@ module ActionView
end
end
- attr_reader :cache_hit # :nodoc:
-
private
def fragment_name_with_digest(name, virtual_path)
@@ -235,13 +233,11 @@ module ActionView
end
def fragment_for(name = {}, options = nil, &block)
- # Some tests might using this helper without initialize actionview object
- @cache_hit ||= {}
if content = read_fragment_for(name, options)
- @cache_hit[@virtual_path] = true
+ @view_renderer.cache_hits[@virtual_path] = :hit
content
else
- @cache_hit[@virtual_path] = false
+ @view_renderer.cache_hits[@virtual_path] = :miss
write_fragment_for(name, options, &block)
end
end