public function setOptions($options)
    {
        // Adding hosts.
        if (!empty($options['hosts'])) {
            foreach ($options['hosts'] as $host => $port) {
                $this->addserver($host, $port, false);
            }
        } else {
            $this->addserver('127.0.0.1', '11211', false);
        }
    }