mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-04 14:22:48 +08:00
缓存驱动类更新
This commit is contained in:
@@ -31,13 +31,13 @@ class Memcache {
|
||||
*/
|
||||
public function __construct($options=[]) {
|
||||
if ( !extension_loaded('memcache') ) {
|
||||
throw new Exception('_NOT_SUPPERT_:memcache');
|
||||
E('_NOT_SUPPERT_:memcache');
|
||||
}
|
||||
if(!empty($options)) {
|
||||
$this->options = array_merge($this->options,$options);
|
||||
}
|
||||
$func = $this->options['persistent'] ? 'pconnect' : 'connect';
|
||||
$this->handler = new Memcache;
|
||||
$this->handler = new \Memcache;
|
||||
$options['timeout'] === false ?
|
||||
$this->handler->$func($options['host'], $options['port']) :
|
||||
$this->handler->$func($options['host'], $options['port'], $options['timeout']);
|
||||
|
||||
Reference in New Issue
Block a user