src/Charcoal/App/Handler/TemplateableHandlerTrait.php
protected function renderHtmlTemplate()
    {
        if ($this->cacheEnabled()) {
            $cachePool = $this->container['cache'];
            $cacheKey  = 'template/'.str_replace('/', '.', $this->cacheIdent());
            $cacheItem = $cachePool->getItem($cacheKey);

            $output = $cacheItem->get();
            if ($cacheItem->isMiss()) {
                $output = $this->renderHtmlTemplateContent();

                $cacheItem->set($output, $this->cacheTtl());
                $cachePool->save($cacheItem);
            }
        } else {
            $output = $this->renderHtmlTemplateContent();
        }

        return $output;
    }
protected function renderHtmlTemplate()
    {
        if ($this->cacheEnabled()) {
            $cachePool = $this->container['cache'];
            $cacheKey  = 'template/'.str_replace('/', '.', $this->cacheIdent());
            $cacheItem = $cachePool->getItem($cacheKey);

            $output = $cacheItem->get();
            if ($cacheItem->isMiss()) {
                $output = $this->renderHtmlTemplateContent();

                $cacheItem->set($output, $this->cacheTtl());
                $cachePool->save($cacheItem);
            }
        } else {
            $output = $this->renderHtmlTemplateContent();
        }

        return $output;
    }
protected function renderHtmlTemplate ( ) { if ( $ this -> cacheEnabled ( ) ) { $ cachePool = $ this -> container [ 'cache' ] ; $ cacheKey = 'template/' . str_replace ( '/' , '.' , $ this -> cacheIdent ( ) ) ; $ cacheItem = $ cachePool -> getItem ( $ cacheKey ) ; $ output = $ cacheItem -> get ( ) ; if ( $ cacheItem -> isMiss ( ) ) { $ output = $ this -> renderHtmlTemplateContent ( ) ; $ cacheItem -> set ( $ output , $ this -> cacheTtl ( ) ) ; $ cachePool -> save ( $ cacheItem ) ; } } else { $ output = $ this -> renderHtmlTemplateContent ( ) ; } return $ output ; }
Render HTML handler.

@see    \Charcoal\App\Route\TemplateRoute::templateContent() Equivalent
@return string
Render HTML handler .