亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Can PHP's array_push and array_pop be used instead of redis' list?
巴扎黑
巴扎黑 2017-05-16 13:14:47
0
4
1269

When making queues, for example, when queuing for product orders, we use redis' list. I think we can use PHP's array_push and array_pop instead of redis' list?

巴扎黑
巴扎黑

reply all(4)
過(guò)去多啦不再A夢(mèng)

An array cannot exist between multiple requests. When a single request ends, the process ends, resources are released, and the array is destroyed. Data persistence is required

漂亮男人

Obviously not. If you can play like this, there will be no need to cache anything

我想大聲告訴你

php is a process, it will not exist the next time after one request. Unless you store this array in the database

漂亮男人

Yes, but you need to use cache to save the status of pushing and popping the stack, because the data of a single user process will not be shared with other users. You need to save it every time it changes. If you don’t need to save it with redis, then use file cache every time. All changes must be saved

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template