public function onPostRenderPage(RendererEvent $event)
    {
        // Checks if page caching is available
        $this->object = $event->getTarget();
        if (false === ($this->object instanceof Page) || false === $this->checkCachePageEvent()) {
            return;
        }

        // Checks if cache_id is available
        if (false === $cache_id = $this->getPageCacheId()) {
            return;
        }

        $column_uids = array();
        foreach ($this->object->getContentSet() as $column) {
            if ($column instanceof AbstractClassContent) {
                $column_uids[] = $column->getUid();
            }
        }

        $lifetime = $this->cache_page->getMinExpireByTag($column_uids);
        $render = $event->getRender();
        $this->cache_page->save($cache_id, $render, $lifetime, $this->object->getUid());
        $this->application->debug(sprintf(
            'Save cache (id: %s, lifetime: %d) for rendering `%s(%s)` with mode `%s`.',
            $cache_id,
            $lifetime,
            get_class($this->object),
            $this->object->getUid(),
            $event->getRenderer()->getMode()
        ));
    }
public function onPostRenderPage(RendererEvent $event)
    {
        // Checks if page caching is available
        $this->object = $event->getTarget();
        if (false === ($this->object instanceof Page) || false === $this->checkCachePageEvent()) {
            return;
        }

        // Checks if cache_id is available
        if (false === $cache_id = $this->getPageCacheId()) {
            return;
        }

        $column_uids = array();
        foreach ($this->object->getContentSet() as $column) {
            if ($column instanceof AbstractClassContent) {
                $column_uids[] = $column->getUid();
            }
        }

        $lifetime = $this->cache_page->getMinExpireByTag($column_uids);
        $render = $event->getRender();
        $this->cache_page->save($cache_id, $render, $lifetime, $this->object->getUid());
        $this->application->debug(sprintf(
            'Save cache (id: %s, lifetime: %d) for rendering `%s(%s)` with mode `%s`.',
            $cache_id,
            $lifetime,
            get_class($this->object),
            $this->object->getUid(),
            $event->getRenderer()->getMode()
        ));
    }
public function onPostRenderPage ( RendererEvent $ event ) { // Checks if page caching is available $ this -> object = $ event -> getTarget ( ) ; if ( false === ( $ this -> object instanceof Page ) || false === $ this -> checkCachePageEvent ( ) ) { return ; } // Checks if cache_id is available if ( false === $ cache_id = $ this -> getPageCacheId ( ) ) { return ; } $ column_uids = array ( ) ; foreach ( $ this -> object -> getContentSet ( ) as $ column ) { if ( $ column instanceof AbstractClassContent ) { $ column_uids [ ] = $ column -> getUid ( ) ; } } $ lifetime = $ this -> cache_page -> getMinExpireByTag ( $ column_uids ) ; $ render = $ event -> getRender ( ) ; $ this -> cache_page -> save ( $ cache_id , $ render , $ lifetime , $ this -> object -> getUid ( ) ) ; $ this -> application -> debug ( sprintf ( 'Save cache (id: %s, lifetime: %d) for rendering `%s(%s)` with mode `%s`.' , $ cache_id , $ lifetime , get_class ( $ this -> object ) , $ this -> object -> getUid ( ) , $ event -> getRenderer ( ) -> getMode ( ) ) ) ; }
Saves in cache the rendered page data.

@param \BackBee\Event\Event $event
Saves in cache the rendered page data .