public function CapacityTracker::getCooldownTimeTotal in Purge 8.3
Get the time in seconds to wait after invalidation for all purgers.
Return value
float The maximum number of seconds - as float - to wait after invalidation.
Throws
\Drupal\purge\Plugin\Purge\Purger\Exception\BadPluginBehaviorException Thrown when the returned floating point value is lower than 0.0, higher than 3.0 or is not returned as floating point value.
Overrides CapacityTrackerInterface::getCooldownTimeTotal
See also
\Drupal\purge\Plugin\Purge\Purger\PurgerCapacityDataInterface::getCooldownTime()
2 calls to CapacityTracker::getCooldownTimeTotal()
- CapacityTracker::getLeaseTimeHint in src/
Plugin/ Purge/ Purger/ CapacityTracker.php - Estimate how long a call to ::invalidate() takes for X amount of objects.
- CapacityTracker::getRemainingInvalidationsLimit in src/
Plugin/ Purge/ Purger/ CapacityTracker.php - Get the remaining number of allowed cache invalidations for this request.
File
- src/
Plugin/ Purge/ Purger/ CapacityTracker.php, line 185
Class
- CapacityTracker
- Provides the capacity tracker.
Namespace
Drupal\purge\Plugin\Purge\PurgerCode
public function getCooldownTimeTotal() {
if (is_null($this->cooldownTimeTotal)) {
$this
->gatherCooldownTimes();
$this->cooldownTimeTotal = array_sum($this->cooldownTimes);
}
return $this->cooldownTimeTotal;
}