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

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -