You are here

public function PurgerBase::getCooldownTime in Purge 8.3

Get the time in seconds to wait after invalidation.

The value is expressed as float between 0.0 and 3.0. After ::invalidate() finished, the system will automatically wait this time to allow the caching platform in front of Drupal, to catch up (before other purgers kick in).

This value adds up to the total time hint of this purger and therefore the higher this value is, the less processing can happen per request. Platforms that clear instantly (e.g.: via a socket) are best off leaving this at 0.0.

Return value

float The maximum number of seconds - as a float - to wait after invalidation.

Overrides PurgerCapacityDataInterface::getCooldownTime

See also

\Drupal\purge\Annotation\PurgePurger::$cooldown_time

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

File

src/Plugin/Purge/Purger/PurgerBase.php, line 74

Class

PurgerBase
Provides a base class for all purgers - the cache invalidation executors.

Namespace

Drupal\purge\Plugin\Purge\Purger

Code

public function getCooldownTime() {
  return $this
    ->getPluginDefinition()['cooldown_time'];
}