There are a number of different ways to approach a problem like this. The simplest approach is to rely on the session timeout setting, which defaults to 20 minutes (or, whatever your machine.config or web.config have set for the application). The problem with this approach is that on the one hand, you probably don't want to shorten the session timeout to 5 minutes, nor do you want to wait 20 minutes for the seats to free up.
Although you can follow the user's navigation on your site, you can't detect when they leave your site for another, so you want a model that will work for both of these scenarios. One possibility would be to add an entry to the cache for this, tied to this user's session ID, and set the object with a sliding expiry of 5 minutes. Update the sliding expiry each time the user hits a page within the workflow of this seat selection process, and be sure to gracefully notify your users of the expiry of this item when they navigate to a page that expects the seat selection to exist. Other requirements for your application design may influence alternate approaches, but this may help you on your way.
Dig Deeper on Topics Archive
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.