我们正在使用 PHP、Redis 和 Predis。我们试图在 Redis 中存储一个对象数组,然后检索它。我们注意到数组不能自然地存储在 Redis 中。存储对象数组并稍后检索它的最佳方法是什么?这是我们的对象数组:
"data": [
{
"doctor_id": 4, -- Use this id for getting in method get inquiry doctor offers.
"clinic": "John",
"distance": "10 mile"
"city": "Los Angeles",
"photo": "http://localhost/botox/storage/web/source/1/j4DnpszEy7epcUMf_N8QY0SRhbs7vLRG.png",
"photos": {
"http://path/image.jpg",
"http://path/image.jpg1"
}
"price": "123",
"photo": false,
"rating": {
"stars": null,
"reviews": null
},
"add_info"=> "Some information",
"time_after_create": 942 -- in seconds.
}
]