Hi I want to keep some values through out the session for each record in emp table. Which one is the best to maintain?
I’m planning to store in db so that each record will have its own value. But it requires multiple db calls for each save/retrieve operations.
Maintaining each record value in session also consumes more memory I guess. I’m in a dilemma to decide.
Can you guys suggest which is the best way to maintain?
Thanks
Go for the DB, get rid of the Session. This way your application will be stateless. Sessions are the worst enemy of scalability in web applications. And if you have some performance concerns you could always use caching or throw a bit of hardware in your webfarm.