Beispiel #1
0
 public function enableCache()
 {
     if (extension_loaded('xcache')) {
         $frontendOptions = array('lifetime' => 60 * 5, 'automatic_serialization' => true);
         $backendOptions = array();
         $cache = Zend_Cache::factory('Core', 'XCache', $frontendOptions, $backendOptions);
         Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
     } else {
         Evil_Log::info('xcache recommended');
     }
 }