You are here

public function MemcacheLockBackend::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 modules/memcache/src/MemcacheLockBackend.php \Drupal\memcache\MemcacheLockBackend::__construct()

Constructs a new MemcacheLockBackend.

File

modules/memcache/src/MemcacheLockBackend.php, line 41
Contains \Drupal\memcache\MemcacheLockBackend.

Class

MemcacheLockBackend
Defines a Memcache lock backend.

Namespace

Drupal\memcache

Code

public function __construct(DrupalMemcacheFactory $memcache_factory) {
  $this->memcache = $memcache_factory
    ->get($this->bin);

  // __destruct() is causing problems with garbage collections, register a
  // shutdown function instead.
  drupal_register_shutdown_function(array(
    $this,
    'releaseAll',
  ));
}