public function init() { // if($this->useMemcached) { // $this->options = [ // \Memcached::OPT_RETRY_TIMEOUT => 1 // ]; // } parent::init(); set_error_handler(function ($code, $message, $file, $line) { $msg = [$code, $message, $file, $line]; CacheVisitLogService::put(1000 + __LINE__, 'error', $msg); }); }
/** * Initialize the component. */ public function init() { $this->setServers($this->loadNodesConfigurations()); parent::init(); }
/** * Initializes this application component. * It creates the memcache instance and adds memcache servers. */ public function init() { $this->keyPrefix = \Yii::$app->id; return parent::init(); }