eager_dispatch (Merb::Cache::CacheMixin::ClassMethods)

    # File lib/merb-cache/merb_ext/controller.rb, line 40
        def eager_dispatch(action, params = {}, env = {}, blk = nil)
          kontroller = if blk.nil?
            new(Merb::Request.new(env))
          else
            result = case blk.arity
              when 0  then  blk[]
              when 1  then  blk[params]
              else          blk[*[params, env]]
            end

            case result
            when NilClass         then new(Merb::Request.new(env))
            when Hash, Mash       then new(Merb::Request.new(result))
            when Merb::Request    then new(result)
            when Merb::Controller then result
            else raise ArgumentError, "Block to eager_cache must return nil, the env Hash, a Request object, or a Controller object"
            end
          end

          kontroller.force_cache!

          kontroller._dispatch(action)

          kontroller
        end