src/Mvc/Controller/Controller.php
protected function _renderView()
	{
		$isCacheEnabled = Agl::app()->isCacheEnabled();

		if ($isCacheEnabled) {
			$cacheInfo = $this->_getCacheInfo();

			if (! empty($cacheInfo)
				and $cacheInstance = Agl::getCache()
				and $cacheInstance->has($cacheInfo[CacheInterface::CACHE_KEY])) {
				return $cacheInstance->get($cacheInfo[CacheInterface::CACHE_KEY]);
			}
		}

        $viewModel = $this->_getView();

		$content = $viewModel
			->startBuffer()
			->render();

		if ($isCacheEnabled and ! empty($cacheInfo)) {
        	$cacheInstance->set($cacheInfo[CacheInterface::CACHE_KEY], $content, $cacheInfo[ConfigInterface::CONFIG_CACHE_TTL_NAME]);
		}

		return $content;
	}
protected function _renderView()
	{
		$isCacheEnabled = Agl::app()->isCacheEnabled();

		if ($isCacheEnabled) {
			$cacheInfo = $this->_getCacheInfo();

			if (! empty($cacheInfo)
				and $cacheInstance = Agl::getCache()
				and $cacheInstance->has($cacheInfo[CacheInterface::CACHE_KEY])) {
				return $cacheInstance->get($cacheInfo[CacheInterface::CACHE_KEY]);
			}
		}

        $viewModel = $this->_getView();

		$content = $viewModel
			->startBuffer()
			->render();

		if ($isCacheEnabled and ! empty($cacheInfo)) {
        	$cacheInstance->set($cacheInfo[CacheInterface::CACHE_KEY], $content, $cacheInfo[ConfigInterface::CONFIG_CACHE_TTL_NAME]);
		}

		return $content;
	}
protected function _renderView ( ) { $ isCacheEnabled = Agl :: app ( ) -> isCacheEnabled ( ) ; if ( $ isCacheEnabled ) { $ cacheInfo = $ this -> _getCacheInfo ( ) ; if ( ! empty ( $ cacheInfo ) and $ cacheInstance = Agl :: getCache ( ) and $ cacheInstance -> has ( $ cacheInfo [ CacheInterface :: CACHE_KEY ] ) ) { return $ cacheInstance -> get ( $ cacheInfo [ CacheInterface :: CACHE_KEY ] ) ; } } $ viewModel = $ this -> _getView ( ) ; $ content = $ viewModel -> startBuffer ( ) -> render ( ) ; if ( $ isCacheEnabled and ! empty ( $ cacheInfo ) ) { $ cacheInstance -> set ( $ cacheInfo [ CacheInterface :: CACHE_KEY ] , $ content , $ cacheInfo [ ConfigInterface :: CONFIG_CACHE_TTL_NAME ] ) ; } return $ content ; }
Render the view page.

@return Controller
Render the view page .