public function __construct($options) { parent::__construct($options); if (!extension_loaded('apc')) { $message = 'APC extension not loaded.'; log_message('error', $message); parent::enabled(false, $message); } }
public function __construct($options) { parent::__construct($options); $ci =& get_instance(); $this->_db = $ci->db; if (!$this->_db->table_exists('cache')) { // you'll see this error once when upgrading from non-cache enabled builds log_message('error', 'Cache table does not exist. Disabling cache.'); parent::enabled(false); } }
public function __construct($options) { parent::__construct($options); if (!extension_loaded('memcache')) { log_message('error', 'Memcache extension not loaded. Disabling cache.'); parent::enabled(false); return false; } $this->_cache = new Memcache(); if (!empty($options['memcache']['servers'])) { $this->server = array_pop($options['memcache']['servers']); if (count($options['memcache']['servers'])) { $this->extra_servers = $options['memcache']['servers']; } } if (!empty($options['memcache']['port'])) { $this->port = $options['memcache']['port']; } $this->_connect(); }
public function __construct($options) { parent::__construct($options); }