String literals vs constants for Session[...] dictionary keys
- by FreshCode
Session[Constant] vs Session["String Literal"] Performance
I'm retrieving user-specific data like ViewData["CartItems"] = Session["CartItems"]; with a string literal for keys on every request. Should I be using constants for this?
If yes, how should I go about implementing frequently used string literals and will it significantly affect performance on a high-traffic site?
Related question does not address ASP.NET MVC or Session.