Class: ActionView::LookupContext::DetailsKey
- Inherits:
-
Object
- Object
- ActionView::LookupContext::DetailsKey
- Defined in:
- lib/action_view/lookup_context.rb
Overview
:nodoc:
Class Method Summary collapse
- .clear ⇒ Object
- .details_cache_key(details) ⇒ Object
- .digest_cache(details) ⇒ Object
- .digest_caches ⇒ Object
- .view_context_class(klass) ⇒ Object
Class Method Details
.clear ⇒ Object
77 78 79 80 81 82 83 84 85 |
# File 'lib/action_view/lookup_context.rb', line 77 def self.clear ActionView::ViewPaths.all_view_paths.each do |path_set| path_set.each(&:clear_cache) end ActionView::LookupContext.fallbacks.each(&:clear_cache) @view_context_class = nil @details_keys.clear @digest_cache.clear end |
.details_cache_key(details) ⇒ Object
69 70 71 72 73 74 75 |
# File 'lib/action_view/lookup_context.rb', line 69 def self.details_cache_key(details) if details[:formats] details = details.dup details[:formats] &= Template::Types.symbols end @details_keys[details] ||= Object.new end |
.digest_cache(details) ⇒ Object
65 66 67 |
# File 'lib/action_view/lookup_context.rb', line 65 def self.digest_cache(details) @digest_cache[details_cache_key(details)] ||= Concurrent::Map.new end |
.digest_caches ⇒ Object
87 88 89 |
# File 'lib/action_view/lookup_context.rb', line 87 def self.digest_caches @digest_cache.values end |
.view_context_class(klass) ⇒ Object
91 92 93 |
# File 'lib/action_view/lookup_context.rb', line 91 def self.view_context_class(klass) @view_context_class ||= klass.with_empty_template_cache end |