You are here

public function CapacityTrackerInterface::getTimeHintTotal in Purge 8.3

Get the maximum number of seconds, processing a single invalidation takes.

The capacity tracker calls getTimeHint on all loaded purger plugins and uses the highest outcome as global estimate. When multiple loaded purger plugins support the same type of invalidation (for instance 'tag'), these values will be added up. This means that if 3 plugins all purge tags, this will cause purge to take it a lot easier and to pull less items from the queue per request.

Return value

float The maximum number of seconds - as float - it takes all purgers to process a single cache invalidation (regardless of type).

Throws

\Drupal\purge\Plugin\Purge\Purger\Exception\BadPluginBehaviorException Thrown when a returned floating point value is lower than 0.1, higher than 10 or is not returned as float.

See also

\Drupal\purge\Plugin\Purge\Purger\PurgerCapacityDataInterface::getTimeHint()

1 method overrides CapacityTrackerInterface::getTimeHintTotal()
CapacityTracker::getTimeHintTotal in src/Plugin/Purge/Purger/CapacityTracker.php
Get the maximum number of seconds, processing a single invalidation takes.

File

src/Plugin/Purge/Purger/CapacityTrackerInterface.php, line 177

Class

CapacityTrackerInterface
Describes the capacity tracker.

Namespace

Drupal\purge\Plugin\Purge\Purger

Code

public function getTimeHintTotal();