I am using PHP 5.3 I am using Redis, to store PHP array data for every requests in Redis variable. I am setting value for 1 redis variable and on every request I am incrementing value by 1. Using that value as key for the each array element. But on concurrent requests its creating problem - 1) Its skipping few records in between. 2) Value of varible is getting stored as key is getting duplicated.
Right now I am using "Predis" as PHP+Redis client. Please help me in this and let me know how can I achive this.
Asked
Active
Viewed 104 times
0

Ajay Y
- 17
- 5
1 Answers
0
Did you try using set (or sorted set) instead? You don't need to worry about managing an external index as its automatically done by Redis.

diegotez
- 21
- 4