Unable to delete keys from redis sentinel [closed]

Unable to delete keys from redis sentinel

solution:

$redis->select($ids['myId']);
$myKeys = $redis->keys("my_pattern_*");
$prefix = $myPrefix;
$myKeys = array_map(function ($key) use ($prefix) {
                    if ($prefix && strpos($key, $prefix) === 0) {
                        return str_replace($prefix, '', $key);
                    }
                    return $key;
                }, $myKeys);
$deleteCount = $redis->del($myKeys);

$deleteCount is always returned as zero.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments