You are here

protected function TimestampInvalidatorBase::markAsOutdated in Memcache API and Integration 8.2

Mark a tag as outdated.

Parameters

string $tag: Tag to mark as outdated.

Return value

float New timestamp for tag.

1 call to TimestampInvalidatorBase::markAsOutdated()
MemcacheTimestampInvalidator::invalidateTimestamp in src/Invalidator/MemcacheTimestampInvalidator.php
Invalidate the timestamp of a tag.

File

src/Invalidator/TimestampInvalidatorBase.php, line 40

Class

TimestampInvalidatorBase
Class TimestampInvalidatorBase.

Namespace

Drupal\memcache\Invalidator

Code

protected function markAsOutdated($tag) {
  $now = $this
    ->getCurrentTimestamp($this->tolerance);
  $current = $this
    ->getLastInvalidationTimestamp($tag);
  if ($now > $current) {
    $this
      ->writeTimestamp($tag, $now);
    return $now;
  }
  else {
    return $current;
  }
}