You are here

public function MemcacheTimestampInvalidator::__construct in Memcache API and Integration 8.2

MemcacheTimestampInvalidator constructor.

Parameters

\Drupal\memcache\Driver\MemcacheDriverFactory $memcache_factory: Factory class for creation of Memcache objects.

string $bin: Memcache bin to store the timestamps in.

float $tolerance: Allowed clock skew between servers, in decimal seconds.

Overrides TimestampInvalidatorBase::__construct

File

src/Invalidator/MemcacheTimestampInvalidator.php, line 29

Class

MemcacheTimestampInvalidator
Class MemcacheTimestampInvalidator.

Namespace

Drupal\memcache\Invalidator

Code

public function __construct(MemcacheDriverFactory $memcache_factory, $bin, $tolerance = 0.001) {
  parent::__construct($tolerance);
  $this->memcache = $memcache_factory
    ->get($bin);
}