NAME
Async::Redis::Iterator - Cursor-based SCAN iterator
SYNOPSIS
my $iter = $redis->scan_iter(match => 'user:*', count => 100);
while (my $batch = await $iter->next) {
for my $key (@$batch) {
say $key;
}
}
DESCRIPTION
Iterator provides async cursor-based iteration over Redis SCAN commands:
- SCAN: Iterate all keys - HSCAN: Iterate hash fields - SSCAN: Iterate set members - ZSCAN: Iterate sorted set members with scores
Behavior
- Returns batches of elements, not individual items - Cursor managed internally - next returns undef when iteration complete - Safe during key modifications (may see duplicates or miss keys) - count is a hint, not a guarantee