NAME

Async::Redis::KeyExtractor - Key position detection for Redis commands

SYNOPSIS

use Async::Redis::KeyExtractor;

# Get indices of key arguments
my @indices = Async::Redis::KeyExtractor::extract_key_indices(
    'MSET', 'k1', 'v1', 'k2', 'v2'
);
# @indices = (0, 2)

# Apply prefix to keys only
my @args = Async::Redis::KeyExtractor::apply_prefix(
    'myapp:', 'MSET', 'k1', 'v1', 'k2', 'v2'
);
# @args = ('myapp:k1', 'v1', 'myapp:k2', 'v2')

DESCRIPTION

This module handles the complex task of identifying which arguments to Redis commands are keys (and should receive namespace prefixes) vs values/options (which should not be modified).