File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
- module CachingRegistry # :nodoc:
1
+
2
+ module ViewComponent
3
+ module CachingRegistry # :nodoc:
2
4
extend self
3
5
4
6
def caching?
5
- ActiveSupport ::IsolatedExecutionState [ :action_view_caching ] ||= false
7
+ ActiveSupport ::IsolatedExecutionState [ :view_component_caching ] ||= false
6
8
end
7
9
8
10
def track_caching
9
- caching_was = ActiveSupport ::IsolatedExecutionState [ :action_view_caching ]
11
+ caching_was = ActiveSupport ::IsolatedExecutionState [ :view_component_caching ]
10
12
ActiveSupport ::IsolatedExecutionState [ :action_view_caching ] = true
11
13
12
14
yield
13
15
ensure
14
- ActiveSupport ::IsolatedExecutionState [ :action_view_caching ] = caching_was
16
+ ActiveSupport ::IsolatedExecutionState [ :view_component_caching ] = caching_was
15
17
end
18
+ end
16
19
end
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ def view_cache_dependencies
24
24
# @private
25
25
def __vc_render_cacheable ( rendered_template )
26
26
if __vc_cache_dependencies != [ :format , :__vc_format ]
27
- CachingRegistry . track_caching do
27
+ ViewComponent :: CachingRegistry . track_caching do
28
28
template_fragment ( rendered_template )
29
29
end
30
30
else
You can’t perform that action at this time.
0 commit comments