session or cache
-
for shoppigcart I use session or cache?whitch on is better?why? (a customer select the item and can go to shoppingcart page and edit the order and then when the customer click the save button ,orders save in database.)
-
for shoppigcart I use session or cache?whitch on is better?why? (a customer select the item and can go to shoppingcart page and edit the order and then when the customer click the save button ,orders save in database.)
Session or cache ? It shows you have no idea about what it is. Please purchase a book and learn ASP.NET. Session : Specific to user Cache : Available to all users
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
-
for shoppigcart I use session or cache?whitch on is better?why? (a customer select the item and can go to shoppingcart page and edit the order and then when the customer click the save button ,orders save in database.)
In this case you have to use session, because Session is based on user. where cache is common for all user. you can use Cache where data for all user same.
cheers, Abhijit
-
In this case you have to use session, because Session is based on user. where cache is common for all user. you can use Cache where data for all user same.
cheers, Abhijit
A more reliable implementation would be to have a temporary orders table you can save selections to this table up until the "check out" procedure. A vistior comes, you check for a cookie (shopper=1234), if they have the cookie you can query the temp table for previous orders, if they don't have the cookie, tag them with one. Any selection is saved to the temp table using the shopper id from the cookie. Once at check out, their cart would have items from the temp table, push these items to the real store/basket table. Once the order has been processed - do whatever.. removing the entries from the temp table. Once a month, once a week or every 24 hours, purge the temporary table to relieve bloating. Something like that should work and it would be more reliable. Relying on session or cache is never a good idea - both can expire unexpectedly.