lithium\storage\cache\adapter\Memcache::_init PHP Method

_init() protected method

Handles the actual Memcached connection and server connection adding for the adapter constructor and sets prefix using the scope if provided.
protected _init ( ) : void
return void
    protected function _init()
    {
        $this->connection = $this->connection ?: new Memcached();
        $servers = array();
        if (isset($this->_config['servers'])) {
            $this->connection->addServers($this->_config['servers']);
            return;
        }
        $this->connection->addServers($this->_formatHostList($this->_config['host']));
        if ($this->_config['scope']) {
            $this->connection->setOption(Memcached::OPT_PREFIX_KEY, "{$this->_config['scope']}:");
        }
    }