Return to Snippet

Revision: 52308
at October 19, 2011 19:08 by yanek1988


Initial Code
// in bootstrap
$frontendOptions = array(
	'lifetime' => 3600,
	'default_options' => array(
		'cache' => false,
		'cache_with_get_variables' => false,
		'cache_with_post_variables' => false,
		'cache_with_session_variables' => true,
		'cache_with_files_variables' => false,
		'cache_with_cookie_variables' => true,
		'make_id_with_get_variables' => false,
		'make_id_with_post_variables' => false,
		'make_id_with_session_variables' => false,
		'make_id_with_files_variables' => false,
		'make_id_with_cookie_variables' => false
	),
	'regexps' => array(
		'^/$' => array( 'cache' => true, 'specific_lifetime' => 900 ),
		'^/newses$' => array( 'cache' => true, 'specific_lifetime' => 900 )
	)
);
$backendOptions = array( 'cache_dir' => Bootstrap::$root.'/cache/' );
$cache = Zend_Cache::factory( 'Page', 'File', $frontendOptions, $backendOptions );
$cache->start();

Initial URL

                                

Initial Description

                                

Initial Title
Zend Cache Page

Initial Tags

                                

Initial Language
PHP