You are here

public function DriverBase::getServers in Memcache API and Integration 8.2

Helper function to get the servers.

File

src/Driver/DriverBase.php, line 243

Class

DriverBase
Class DriverBase.

Namespace

Drupal\memcache\Driver

Code

public function getServers() {
  $memcache_servers = \Drupal::configFactory()
    ->getEditable('memcache.settings')
    ->get('memcache_servers');
  if (!isset($memcache_servers)) {
    $memcache_servers = [
      '127.0.0.1:11211' => 'default',
    ];
  }
  return $memcache_servers;
}