docs: function renderViewBuffer() {
    
    var buffer, codeBlock, controller, data, logData, relPath, request,
        template, view, viewBuffers, viewCaching, viewCallbacks,
        runtimeData = this.__runtimeData,
        self = this;
              
    // This block only runs when view rendering is complete
    request = this.request;
    
    // Prevent duplicate view rendering on static files
    if (request.isStatic) return delete request.isStatic;
    
    if (runtimeData.views.length === 0) {
      
      // Run view filters (context event)
      applyViewFilters.call(this, runtimeData);
  
      if (this.__headers['Cache-Control'] == null) {
        var httpErr = (this.statusCode).toString().charAt(0);
        var cc = (httpErrors.indexOf(httpErr) >= 0) ? 'error' : 'dynamic';
        this.setHeaders({
          'Cache-Control': app.config.cacheControl[cc]
        });
      }
  
      this.sendHeaders();
      this.end(runtimeData.buffer, 'utf8');
      
      return;
  
    }
  
    viewCaching = app.viewCaching;
    viewCallbacks = app.views.callbacks;
    viewBuffers = app.views.buffers;
    data = runtimeData.data;
    controller = runtimeData.controller;
    view = runtimeData.views.shift();
    
    template = this.getViewPath(view);
    
    if (typeof template == 'undefined') {
      // the specified view does not exist
      if (view) app.serverError(this, ['View does not exist: ' + controller.getAlias() + '/' + view]);
      return;
    }
  
    data.__filename = template;
    data.__dirname = pathModule.dirname(template);
  
    // Set engine for specific template
    self.engine = app.defaultEngine.getEngineByExtension(template);
    relPath = app.relPath(template, app.mvcpath.slice(1) + 'views');
  
    if (viewCaching) {
      if (viewCallbacks[relPath] instanceof Function) {
        try {
          buffer = viewCallbacks[relPath](data);
        } catch (e) {
          buffer = e;
        }
        if (typeof buffer == 'string') {
          app.emit('view_cache_access', app, relPath);
          runtimeData.buffer += buffer;
          renderViewBuffer.call(this);
          return;
        } else {
          app.emit('view_cache_access', app, relPath);
          logData = [relPath, buffer];
          app.serverError(this, logData);
          return;
        }
      } else if ((viewBuffers[relPath] != null) && util.isArray(viewBuffers[relPath])) {
        app.emit('view_cache_access', app, relPath);
        logData = viewBuffers[relPath];
        app.serverError(this, logData);
        return;
      }
    }
    
    fs.exists(template, function(exists) {
      if (viewCaching) app.emit('view_cache_store', app, relPath);
      if (exists) {
        fs.readFile(template, 'utf-8', function(err, templateBuffer) {
          if (err) {
            app.serverError(self, new Error(util.format('Unable to read file: %s', relPath)));
          } else {
            
            if (self.engine.async) {
              self.once('__async_template_done', function(buffer) {
                if (typeof buffer == 'string') {
                  runtimeData.buffer += buffer;
                  renderViewBuffer.call(self);
                } else {
                  logData = [relPath, buffer];
                  if (viewCaching) viewBuffers[relPath] = logData;
                  app.serverError(self, logData);
                }
              });
  
              self.engine.render(templateBuffer, data, relPath);
  
            } else {
              
              buffer = self.engine.render(templateBuffer, data, relPath);
              if (typeof buffer == 'string') {
                runtimeData.buffer += buffer;
                renderViewBuffer.call(self);
              } else {
                logData = [relPath, buffer];
                if (viewCaching) viewBuffers[relPath] = logData;
                app.serverError(self, buffer);
              }
  
            }
          }
        });
      } else {
        app.serverError(self, new Error(util.format("The file can't be found: %s", app.relPath(template))));
      }
    });
  }