Пример #1
0
 /**
  *  _load
  *
  *  @access protected
  */
 protected function _load()
 {
     parent::_load();
     if ($this->config['use_pconnect']) {
         $this->m = new Memcached($this->ctl->getAppId());
     } else {
         $this->m = new Memcached();
     }
     if (isset($this->config['servers']) && is_array($this->config['servers'])) {
         $this->m->addServers($this->config['servers']);
     } else {
         $this->m->addServer($this->config['host'], $this->config['port']);
     }
     $this->m->setOption(Memcached::OPT_CONNECT_TIMEOUT, $this->config['timeout'] * 1000);
     //$this->m->setOption(Memcached::OPT_CONNECT_TIMEOUT, $this->config['retry']);
 }
Пример #2
0
 /**
  *  _load
  *
  *  @access protected
  */
 public function _load()
 {
     parent::_load();
     $this->memcache_pool = array();
 }
Пример #3
0
 /**
  *  _load
  *
  *  @access protected
  */
 protected function _load()
 {
     parent::_load();
     $this->memcache_pool = array();
 }