You are here

protected function MemcacheDriverFactory::flush in Memcache API and Integration 8.2

Flushes the memcache bin/server/cache mappings and closes connections.

1 call to MemcacheDriverFactory::flush()
MemcacheDriverFactory::get in src/Driver/MemcacheDriverFactory.php
Returns a Memcache object based on settings and the bin requested.

File

src/Driver/MemcacheDriverFactory.php, line 198

Class

MemcacheDriverFactory
Factory class for creation of Memcache objects.

Namespace

Drupal\memcache\Driver

Code

protected function flush() {
  foreach ($this->connections as $cluster) {
    $cluster
      ->close();
  }
  $this->connections = [];
}