protected function __construct() { $config = Zend_Registry::get('config')->site; $oBackend = Z_Cache::getbackend(); $oFrontend = new Zend_Cache_Frontend_Output(array('caching' => $config->get('cache_on', false), 'lifetime' => $config->get('cache_life_time', 60), 'cache_id_prefix' => trim(str_replace(DIRECTORY_SEPARATOR, '_', SITE_PATH), '_') . '_', 'write_control' => true, 'automatic_serialization' => true, 'ignore_user_abort' => true)); $oCache = Zend_Cache::factory($oFrontend, $oBackend); self::$_instance = $oCache; }
public function routeShutdown(Zend_Controller_Request_Abstract $request) { if ($request->getModuleName() == 'admin' || APPLICATION_ENV != 'development') { return; } $frontController = Zend_Controller_Front::getInstance(); $options = array('plugins' => array('Variables', 'Database' => array('adapter' => Z_Db_Table::getDefaultAdapter()), 'File' => array('basePath' => SITE_PATH), 'Memory', 'Time', 'Registry', 'Cache' => array('backend' => Z_Cache::getbackend()), 'Exception')); $debug = new ZFDebug_Controller_Plugin_Debug($options); $frontController->registerPlugin($debug); }