Skip to content

Instantly share code, notes, and snippets.

@eminetto
Created May 23, 2011 19:38
Show Gist options
  • Save eminetto/987401 to your computer and use it in GitHub Desktop.
Save eminetto/987401 to your computer and use it in GitHub Desktop.
$frontendOptions = array(
   'lifetime' => 7200, // tempo de vida de 2 horas
   'automatic_serialization' => true
);
 
$backendOptions = array(
    'cache_dir' => CACHE_PATH //
);
 
// criando uma instancia do cache
$cache = Zend_Cache::factory('Core',//frontend
                             'File',  //backend
                             $frontendOptions,
                             $backendOptions);
/*
* Salva o cache no Registry para ser usado posteriormente
*/
Zend_Registry::set('cache', $cache);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment