Hi all, 

i'm using this code in my Bootstrap.php for caching my pages: 

    protected function _initCache() { 
        $this->bootstrap('Config'); 
        $config = $this->getResource('Config'); 

        $cache = Zend_Cache::factory('Page', 'File', 
            array( 
               'lifetime' => 259200, 
               'debug_header' => (APPLICATION_ENV === 'development') ? true
: false, // for debugging 
               'default_options' => 
                    array( 
                        'cache' => (APPLICATION_ENV === 'development') ?
false : true, 
                        'cache_with_get_variables'       => true, 
                        'cache_with_session_variables'   => true, 
                        'cache_with_cookie_variables'    => true, 
                        'make_id_with_get_variables'     => true, 
                        'make_id_with_session_variables' => true, 
                        'make_id_with_cookie_variables'  => false 
                    ), 
               '^/$' => array( 
                        'cache' => true, 
                        'lifetime' => 10 
                    ), 
               '^/nasa-ponuka' => array( 
                        'cache' => true, 
                        'lifetime' => 10 
                    ) 
            ), 
            array( 
                'cache_dir'              => $config->cache->directory, 
                'file_name_prefix'       => 'maxbel_page_', 
                'file_locking'           => true, 
                'hashed_directory_level' => 1, 
                'hashed_directory_umask' => 755, 
                'cache_file_umask'       => 0644 
            ) 
        ); 

        $cache->start(); 
    } 

My problem is that I need for some pages diferrent lifetime, but this
setting zend_cache doesn't accept, I can set up the lifetime param only for
whole frontend cache. 

Someone solved this problem ? The only one solution to my idea is to create
Zend_Cache instance for every page which have different lifetime, but it's
clumsy. 
I would expected some support in Zend_Cache_Frontend_Page. 

When somebody have experience with this or somebody have solved or resolved
this problem, I would be very grateful for any advice. 

Thank you for any suggestion.
-- 
View this message in context: 
http://www.nabble.com/-Zend_Cache_Frontend_Page--Diferrent-lifetime-for-separate-pages-tp24935048p24935048.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to