actionview/lib/action_view/digestor.rb
# Supported options:
#
# * <tt>name</tt>   - Template name
# * <tt>finder</tt>  - An instance of ActionView::LookupContext
# * <tt>dependencies</tt>  - An array of dependent views
# * <tt>partial</tt>  - Specifies whether the template is a partial
Supported options:
name   - Template name
finder  - An instance of ActionView::LookupContext
dependencies  - An array of dependent views
partial  - Specifies whether the template is a partial
Supported options : name - Template name finder - An instance of ActionView :: LookupContext dependencies - An array of dependent views partial - Specifies whether the template is a partial
def compute_and_store_digest(cache_key, options) 
          klass = if options[:partial] || options[:name].include?("/_")
            pre_stored = @@cache.put_if_absent(cache_key, false).nil? 
            PartialDigestor
          else
            Digestor
          end
          digest = klass.new(options).digest
          @@cache[cache_key] = stored_digest = digest if ActionView::Resolver.caching?
          digest
        ensure
          @@cache.delete_pair(cache_key, false) if pre_stored && !stored_digest
        end
def compute_and_store_digest ( cache_key , options ) klass = if options [ :partial ] || options [ :name ] . include? ( "/_" ) pre_stored = @@cache . put_if_absent ( cache_key , false ) . nil? PartialDigestor else Digestor end digest = klass . new ( options ) . digest @@cache [ cache_key ] = stored_digest = digest if ActionView :: Resolver . caching? digest ensure @@cache . delete_pair ( cache_key , false ) if pre_stored && ! stored_digest end
Supported options:
 <tt>name</tt>   - Template name
 <tt>finder</tt>  - An instance of ActionView::LookupContext
 <tt>dependencies</tt>  - An array of dependent views
 <tt>partial</tt>  - Specifies whether the template is a partial
Supported options : <tt > name< / tt > - Template name <tt > finder< / tt > - An instance of ActionView :: LookupContext <tt > dependencies< / tt > - An array of dependent views <tt > partial< / tt > - Specifies whether the template is a partial
# called under @@digest_monitor lock # Prevent re-entry or else recursive templates will blow the stack. # There is no need to worry about other threads seeing the +false+ value, # as they will then have to wait for this thread to let go of the @@digest_monitor lock. # put_if_absent returns nil on insertion # Store the actual digest if config.cache_template_loading is true # something went wrong or ActionView::Resolver.caching? is false, make sure not to corrupt the @@cache
cache_key
<not_specific>
options
<not_specific>