I am trying to set up a redis cach system. I have Json data coming in and I want to store it in a specific way! Currently im trying to just have an ordered list as there will be lots of data stored here before deleting. The basic data i am using is
{
user_id: "123456789"
acc_x: "123456789"
acc_y: "123456789"
acc_z: "123456789"
time: "123456789"
}
The way I would like to store it in redis is something like this:
user_id:"123456789" -> acc_x:"123456789" , acc_y:"123456789" ,acc_z:"123456789" , time:"123456789"
Ive tried with two variables like this
//Where temp is a place holder for values
client.mset("AccelX", temp_x,"AccelY", temp_y, redis.print);
This approach does not work and I am just confused as to how to do it if anyone knows a way or any documentation that would be great