Home > Back-end >  Singleton shopping cart implementation issues
Singleton shopping cart implementation issues

Time:10-01

Doing a little shopping demo, at present is to put the shopping cart is session, said online shopping cart can be set to the singleton, I tried it on, this effect is that the shopping cart I added a commodity, log out, clear after the session, the next login will still retain a shopping cart data, but multiple users would not share a shopping cart, a description about the multi-user online all have no, look not to understand,

CodePudding user response:

Shopping cart is currently the mainstream are stored in redis, use hash format to add authorization access is very convenient, the efficiency is very high, you can also use local cookie, only have size limit cookies, session if I haven't heard of
  • Related