You are here

public function DrupalMemcache::addServer in Memcache Storage 8

Adds a new memcached server.

Parameters

$host: Memcached host name. For example:

  • 127.0.0.1
  • /path/to/memcached.socket.

$port: Port for memcached host. Always 0 for unix sockets.

Overrides DrupalMemcachedInterface::addServer

File

src/DrupalMemcache.php, line 86

Class

DrupalMemcache
Class DrupalMemcache

Namespace

Drupal\memcache_storage

Code

public function addServer($host, $port) {
  $this->memcached
    ->addserver($host, $port, $this->persistentConnection);
}