国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

mysql - Newbie thinkphp mall design issues
阿神
阿神 2017-05-16 13:03:36
0
1
862

1. Once a mall user purchases a product and generates an order, they modify the mall inventory. At this time, should they directly modify the database data or cache the inventory value of the product first and then modify the cached value globally and wait until a certain time? Write to database?
2. How to lock for concurrent processing

阿神
阿神

閉關(guān)修行中......

reply all(1)
Peter_Zhu

When the amount of access is large, it is not good to perform frequent read and write operations on the database. It is recommended to use the cache layer and use the queue to update in batches at the same time.
As for the locking issue (I don’t have any substantive suggestions), I generally adopt pessimistic locking. . .

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