public function indexAction() { //获取文章分类 $mapCate = new Application_Model_CategoryMapper(); $result = $mapCate->getCateAritcle(BLOGGER_ID); $this->view->data = $result; }
public function indexAction() { $cache = Zend_Registry::get('cache'); $id = md5("artcateControllerIndex"); if (($result = $cache->load($id)) === false) { $mapCate = new Application_Model_CategoryMapper(); $result = $mapCate->getCateAritcle(BLOGGER_ID); $cache->save($result, $id, array('artcatebox')); } //print_r($result); $this->view->data = $result; }