code/libraries/joomlatools/component/koowa/controller/behavior/cacheable.php
protected function _afterRender(KControllerContextInterface $context)
    {
        if(empty($this->_output))
        {
            $view   = $this->getView();
            $cache  = $this->_getCache($this->_getGroup(), 'output');
            $key    = $this->_getKey();

            $data  = array();

            //Store the unrendered view output
            if($view instanceof KViewTemplate)
            {
                $data['component'] = (string) $view->getTemplate()->render();

                $buffer = JFactory::getDocument()->getBuffer();
                if(isset($buffer['modules'])) {
                    $data['modules'] = array_intersect_key($buffer['modules'], array_flip($this->_modules));
                }
            }
            else $data['component'] = $context->result;

            $cache->store(serialize($data), $key);
        }
    }
protected function _afterRender(KControllerContextInterface $context)
    {
        if(empty($this->_output))
        {
            $view   = $this->getView();
            $cache  = $this->_getCache($this->_getGroup(), 'output');
            $key    = $this->_getKey();

            $data  = array();

            //Store the unrendered view output
            if($view instanceof KViewTemplate)
            {
                $data['component'] = (string) $view->getTemplate()->render();

                $buffer = JFactory::getDocument()->getBuffer();
                if(isset($buffer['modules'])) {
                    $data['modules'] = array_intersect_key($buffer['modules'], array_flip($this->_modules));
                }
            }
            else $data['component'] = $context->result;

            $cache->store(serialize($data), $key);
        }
    }
protected function _afterRender ( KControllerContextInterface $ context ) { if ( empty ( $ this -> _output ) ) { $ view = $ this -> getView ( ) ; $ cache = $ this -> _getCache ( $ this -> _getGroup ( ) , 'output' ) ; $ key = $ this -> _getKey ( ) ; $ data = array ( ) ; //Store the unrendered view output if ( $ view instanceof KViewTemplate ) { $ data [ 'component' ] = ( string ) $ view -> getTemplate ( ) -> render ( ) ; $ buffer = JFactory :: getDocument ( ) -> getBuffer ( ) ; if ( isset ( $ buffer [ 'modules' ] ) ) { $ data [ 'modules' ] = array_intersect_key ( $ buffer [ 'modules' ] , array_flip ( $ this -> _modules ) ) ; } } else $ data [ 'component' ] = $ context -> result ; $ cache -> store ( serialize ( $ data ) , $ key ) ; } }
Store the unrendered view data in the cache

@param   KControllerContextInterface $context A command context object
@return 	void
Store the unrendered view data in the cache