How can I set cache time for Cart Items on client PC ?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 Jahre weitere
Hi Guys,

I am checking my NopCommerce application. There is one thing I would like to know:

How can I set cache time for Cart Items on client PC ?

I have noted that when I check my application (as a customer) and suppose I put two items into my Cart. Then w/o checking out I close my browser window and then reopen it again, browse to site and there again when I check my cart, it still contains those two items already in my cart.

Now from customer's point of view, this may appear to be a problem. I just want that if a Customer closes his window w/o checking out, then his cart items should not be cached on his pc or there must be some way to define that cache time somewhere in application ?

Please someone guide me.

Thanks in advance.
13 Jahre weitere
It is not cached on the user's PC, but it is stored in the database.

If you want to get rid of the items, then you should probably write some Task that deletes the items when they are x hours old.
Take a look at the DeleteExpiresCustomerSessionsTask or the ClearCache task for an example.
13 Jahre weitere
Thanks for the update.

Can you please elaborate in a bit more detail following:

"Take a look at the DeleteExpiresCustomerSessionsTask or the ClearCache task for an example. "

Many thanks.
13 Jahre weitere
A task is executed periodically and is configured in web.config.
Take a look at the source of the mentioned tasks to get a clearer picture of what a task can do for you in getting rid of the cart contents. The source code is visible if you download the source version of nopCommerce. You will need to have programming skills to create such a task.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.