protected function ReportController::scan in Redis 8
Wrapper to SCAN through matching redis keys.
Parameters
string $match: The MATCH pattern.
int $count: Count of keys per iteration (only a suggestion to Redis).
Return value
\Generator
1 call to ReportController::scan()
- ReportController::overview in src/
Controller/ ReportController.php - Redis report overview.
File
- src/
Controller/ ReportController.php, line 292
Class
- ReportController
- Redis Report page.
Namespace
Drupal\redis\ControllerCode
protected function scan($match, $count = 10000) {
$it = NULL;
if ($this->redis instanceof \Redis) {
while ($keys = $this->redis
->scan($it, $this
->getPrefix() . '*', $count)) {
yield from $keys;
}
}
elseif ($this->redis instanceof \Predis\Client) {
yield from new Keyspace($this->redis, $match, $count);
}
}