public function __construct($params = null)
 {
     parent::__construct($params);
     $this->page = max(1, $this->getRequest()->get('page', 1, waRequest::TYPE_INT));
     $this->search_params = $this->getRequest()->param();
     $layout = $this->getRequest()->get('layout', 'default', waRequest::TYPE_STRING_TRIM);
     if ($layout == 'lazyloading' && $this->page > 1) {
         $this->is_lazyloading = true;
     }
     if (false && ($this->cache_time = $this->getConfig()->getOption('cache_time'))) {
         $params = $this->search_params;
         $params['page'] = $this->page;
         $this->cache_id = blogHelper::buildCacheKey($params);
         /**
          * @todo enable partial caching wait for Smarty 3.2.x
          * @link http://www.smarty.net/forums/viewtopic.php?p=75251
          */
         $this->cache = new waSerializeCache($this->cache_id, $this->cache_time);
         if ($this->cache->isCached()) {
             if ($post_ids = $this->cache->get()) {
                 //get comments count per post
                 $posts = array_fill_keys($post_ids, array());
                 blogHelper::extendPostComments($posts);
                 $this->view->assign('posts', $posts);
             }
         }
     }
     if (!$this->is_lazyloading) {
         $this->setLayout(new blogFrontendLayout());
     }
     $this->setThemeTemplate('stream.html');
     return $this;
 }