Zend_Cache can be configured to cache several types of output, including
the results of function calls, the results of object and static method calls,
entire pages, and configuration data.
鑑於這種控制器和相關視圖你會如何去緩存?從什麼你們中的一些建議here(見@marcin)我明白,清除整個緩存只是一個單一的評論或更新會太多。我應該如何去分別緩存它們?Zend的緩存前端配置
基本上我有一個博客頁面,我用相對用戶評論加載所有的帖子。
- 索引控制器(家庭頁):
class IndexController extends Zend_Controller_Action
{
public function indexAction()
{
//Post is a db_table model
$post_manager=new Post();
$allPosts=$post_manager->getAllPosts();
$this->view->posts=$allPosts;
}
}
-index.phtml:
echo $this->partialLoop('_posts.phtml',$this->posts);
-_posts.phtml:
- _comments.phtml:
echo $this->object->text;
請張貼實際的例子
再次感謝
感謝您的解決方案永遠是優秀的! ;) – luca 2011-06-09 07:55:45
我還有一些未解決的zend問題..如果你想!他們在這裏稱他們爲'簡單的錢'=)http://stackoverflow.com/questions/6166699/zend-wrap-formerrors-with-user-defined-html-tags – luca 2011-06-09 08:02:18