I have configured the phpredis. When I set only 10 values in a list called tutorial list
and call for the range 0, 9
, I get all the values correct. But when I try range 0, 100
or 0, 267
, I still get like 29 or 39 values.
Why am i seeing the repeated values when there are only 10 values?
My code:
$redis->lpush("tutorial-list", "Redis"); $redis->lpush("tutorial-list", "MongoDB");
$redis->lpush("tutorial-list", "DynamoDB"); $redis->lpush("tutorial-list", "MS-SQL");
$redis->lpush("tutorial-list", "MySQL"); $redis->lpush("tutorial-list", "NoSQL");
$redis->lpush("tutorial-list", "Oracle"); $redis->lpush("tutorial-list", "Sybase");
$redis->lpush("tutorial-list", "Sybase"); $redis->lpush("tutorial-list", "IBM DB2");
$myList = $redis->lrange("tutorial-list",0,9);
echo "<hr>Stored strings in Redis:: <pre>" ;
print_r($myList);