You are here

public function CapacityTrackerInterface::getLeaseTimeHint in Purge 8.3

Estimate how long a call to ::invalidate() takes for X amount of objects.

Parameters

int $items: The number of objects about to be offered to the purgers service.

Return value

int The number of seconds cache invalidation will take for this many items.

Throws

\Drupal\purge\Plugin\Purge\Purger\Exception\BadBehaviorException Thrown when $number_of_objects is lower than 1 or not an integer.

See also

\Drupal\purge\Plugin\Purge\Purger\CapacityTrackerInterface::getTimeHintTotal()

\Drupal\purge\Plugin\Purge\Purger\CapacityTrackerInterface::getCooldownTimeTotal()

1 method overrides CapacityTrackerInterface::getLeaseTimeHint()
CapacityTracker::getLeaseTimeHint in src/Plugin/Purge/Purger/CapacityTracker.php
Estimate how long a call to ::invalidate() takes for X amount of objects.

File

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

Class

CapacityTrackerInterface
Describes the capacity tracker.

Namespace

Drupal\purge\Plugin\Purge\Purger

Code

public function getLeaseTimeHint($items);