class ActionView::Resolver

def cached(key, path_info, details, locals) #:nodoc:

:nodoc:
resolver is fresher before returning it.
it always hits the resolver but if the key is present, check if the
always check the cache before hitting the resolver. Otherwise,
Handles templates caching. If a key is given and caching is on
def cached(key, path_info, details, locals) #:nodoc:
  name, prefix, partial = path_info
  locals = locals.map { |x| x.to_s }.sort!
  if key
    @cache.cache(key, name, prefix, partial, locals) do
      decorate(yield, path_info, details, locals)
    end
  else
    decorate(yield, path_info, details, locals)
  end
end