class ActionView::LookupContext::DetailsKey
:nodoc:
def self.clear
def self.clear ActionView::PathRegistry.all_resolvers.each do |resolver| resolver.clear_cache end @view_context_class = nil @details_keys.clear @digest_cache.clear end
def self.details_cache_key(details)
def self.details_cache_key(details) @details_keys.fetch(details) do if formats = details[:formats] unless Template::Types.valid_symbols?(formats) details = details.dup details[:formats] &= Template::Types.symbols end end @details_keys[details] ||= TemplateDetails::Requested.new(**details) end end
def self.digest_cache(details)
def self.digest_cache(details) @digest_cache[details_cache_key(details)] ||= Concurrent::Map.new end
def self.digest_caches
def self.digest_caches @digest_cache.values end
def self.view_context_class
def self.view_context_class @view_context_mutex.synchronize do @view_context_class ||= ActionView::Base.with_empty_template_cache end end