You are here

public function CapacityTracker::spentInvalidations in Purge 8.3

Get the counter for the number of invalidations touched this request.

Return value

\Drupal\purge\Counter\CounterInterface The counter object.

Overrides CapacityTrackerInterface::spentInvalidations

File

src/Plugin/Purge/Purger/CapacityTracker.php, line 367

Class

CapacityTracker
Provides the capacity tracker.

Namespace

Drupal\purge\Plugin\Purge\Purger

Code

public function spentInvalidations() {
  if (is_null($this->spentInvalidations)) {
    $this->spentInvalidations = new Counter(0);
    $this->spentInvalidations
      ->disableDecrement();
    $this->spentInvalidations
      ->disableSet();
  }
  return $this->spentInvalidations;
}