public function PhpRedis::clear in Redis 8
Makes the flood control mechanism forget an event for the current visitor.
Parameters
string $name: The name of an event.
string $identifier: (optional) Unique identifier of the current user. Defaults to the current user's IP address).
Overrides FloodInterface::clear
File
- src/Flood/ PhpRedis.php, line 64 
Class
- PhpRedis
- Defines the database flood backend. This is the default Drupal backend.
Namespace
Drupal\redis\FloodCode
public function clear($name, $identifier = NULL) {
  if (!isset($identifier)) {
    $identifier = $this->requestStack
      ->getCurrentRequest()
      ->getClientIp();
  }
  $key = $this
    ->getPrefix() . ':flood:' . $name . ':' . $identifier;
  $this->client
    ->del($key);
}