Suppose each user has certain preferences that is saved in database for that user. For example: UnitSystem, UILanguage, TimeZone,...
When an http-request is made we need to have access to user preferences (e.g UnitSystem, TimeZone, ...) to correctly process the data and render the view in the correct language.
What is the correct way to save/access user preferences during program execution?
- Read the user preferences from database for each http-request
- Read user preferences once when user logs into the application and save it in session variables.
- Read user preferences once when user logs into the application and save it in a cookie.
How do you handle global settings in your MVC based applications?