I am creating an e-commerce application in which I have a shopping cart.
My current structure is that whenever a user saves a product, I put the product in a datatable and datatable for the session, so that until the session is completed, the user can have a list that they saved.
However, I increased the session timeout to 600 minutes (10 hours), but I am worried that this is the best approach to store information about the shopping cart, because if there are, for example, 1000 users accessing the site at the same time, being 1000 session objects created on the server will not degrade the performance of my site.
I can’t save it in the database, because if the user is anonymous, I don’t have a unique thing about the user, so if 1000 users get access to the site, all products get merged, I can’t extract the product saved by the current user.
Is there any other better approach for this problem.
Abbas source share