I am developing on ASP.NET e-Shop software .
Which one is right ?
- Keeping user shopping cart items in cache with an expire time
- Keeping user shopping cart items in database
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no right or wrong… all depends on your requirements regarding scalability, performance etc.
IF you design for really high performance I would cache those in-memory (i.e. write-through cache) but also persist them into DB with an expire time… if data loss is no problem then you can wait with persisting till user finishes the order…