Is it support Application cache in multiple server in asp.net(C#)?
Is it support Application cache in multiple server in asp.net(C#). I know
application variable is not supporting in multiple server (web farms), But
what about application cache? .Will be there any issue whiling access the
values or it not worth to store values in application cache when we are
going with multiple server? (Database storing not suitable, it will take
more load). Here i am using codes
HybridDictionary dicApplicationVariable = new HybridDictionary();
if
(HttpContext.Current.Cache["dicApplicationVariable"]
!= null)
{
dicApplicationVariable =
(HybridDictionary)HttpContext.Current.Cache["dicApplicationVariable"];
if
(dicApplicationVariable.Contains(dtUserLogin.Rows[0]["Id"]))
{
dicApplicationVariable.Remove(dtUserLogin.Rows[0]["Id"]);
dicApplicationVariable.Add(dtUserLogin.Rows[0]["Id"],
LogginSessionID);
}
else
{
dicApplicationVariable.Add(dtUserLogin.Rows[0]["Id"],
LogginSessionID);
}
}
else
{
dicApplicationVariable.Add(dtUserLogin.Rows[0]["Id"],
LogginSessionID);
HttpContext.Current.Cache["dicApplicationVariable"]
= dicApplicationVariable;
}
No comments:
Post a Comment