거기에 멋진 방법으로 zend_cache가 프런트 엔드 뷰를 처리하도록 만드는 방법이 있습니까? 로드 시간을 줄이고 페이지 캐싱을 수행하는 것이 가장 좋은 방법이라고 생각합니다.똑똑한 페이지 캐싱과 유사한 Zend 페이지 캐싱?
{nocache}와 비슷한 것이 필요합니다. 좋아
그래서 지금이 :
protected function _initCache() {
$this->bootstrap('locale');
$locale = $this->getResource('locale');
$front = array ('lifetime' => 1800,
'automatic_serialization' => false,
'caching' => true,
'cache_id_prefix' => 'ec_',
'debug_header' => true,
'default_options'
=> array ('cache_with_get_variables' => true,
'cache_with_post_variables' => false,
'cache_with_session_variables' => false,
'cache_with_cookie_variables' => false),
);
$back = array('cache_dir' => '../data/Cache/'.$locale);
$cache = Zend_Cache::factory('Page', 'File', $front, $back);
$cache->start();
Zend_Registry::set('cache', $cache);
return $cache;
}
Bootstrap.php
하지만, 내 캐시가 명중 유일한 시간 같은 코드입니다 :$cache = Zend_Registry::get('cache');
if (!$data = $cache->load('sidebar_'.$module.'_'.$controller)) {
$data['Studio'] = Eurocreme_Studio::load_by_type(array('type' => 'sidebar', 'from' => 0, 'to' => COUNT_HIGH));
$data['Movie'] = Eurocreme_Movie::load_by_type(array('type' => 'sidebar', 'from' => 0, 'to' => 5));
$data['Gallery'] = Eurocreme_Gallery::load_by_type(array('type' => 'sidebar', 'from' => 0, 'to' => 5));
$data['Category'] = Eurocreme_Category::load_tree(0);
$cache->save($data, 'my_view_helper_sidebar_'.$module.'_'.$controller);
}
내가 전체보기를 캡처 기대했다.
누구나 완벽하게 구현하는 방법에 대한 실무 사례가 있습니까? 문서는 실제로 깊이 들어가지 않습니다.