Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.13 KB | None | 0 0
  1. protected function _initCache()
  2.     {
  3.         $frontendName = 'Page';
  4.         $backendName = 'File';        
  5.  
  6.         $frontendOptions = array(
  7.         'lifetime'                  => 3600,
  8.         'debug_header'              => false,
  9.         'automatic_cleaning_factor' => 10000,
  10.         'default_options'           => array(
  11.             'cache'                          => true,
  12.             'cache_with_get_variables'       => true,
  13.             'cache_with_cookie_variables'    => true,
  14.             'cache_with_session_variables'   => true,
  15.             'cache_with_post_variables'      => false,
  16.             'make_id_with_get_variables'     => true,
  17.             'make_id_with_post_variables'    => false,
  18.             'make_id_with_session_variables' => false,
  19.             'make_id_with_files_variables'   => false,
  20.             'make_id_with_cookie_variables'  => false,
  21.         )
  22.  
  23.         $backendOptions = array(
  24.             'cache_dir' => APPLICATION_PATH . '/data/cache'
  25.         );
  26.  
  27.         $cache = Zend_Cache::factory($frontendName, $backendName, $frontendOptions, $backendOptions);
  28.  
  29.         $cache->start();
  30.        
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement