in asp.net can we give same name to session variable and cache variable -


in asp.net can give same name session variable , cache variable

session["lookup"] = "a"; cache["lookup"] = "a123"; ?

will not clashed @ access point in page ?

do mean cache collection?

if so, not same collection session. session application wide user specific collection cache application wide not user specific. not same object.

from msdn:

one instance of class created per application domain, , remains valid long application domain remains active.

i should warn cache collection global object users, , therefore think user specific information should avoided.

best practices , use: http://msdn.microsoft.com/en-us/library/aa478965.aspx


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -