Creating a Web App using ASP.NET MVC3, essential framework includes NHibernate (Fluent), Ninject, Razor, Automapper, Jquery, Rhino-Security.
Need to decide upon State Management Stratety (Session and Cache level). I have heard of following caching types,
Considering a general scenario, I want to understand State Management policy to be used during a request,
LOGIN
PAGE ACCESS
I see i have been too verbose. In fact i do have more Questions, but let me see first if smbdy really bothers to read this much crap here
Regarding User Permissions, given they are the same for each User Group, I would store them in Cache like this:
if (System.Web.HttpContext.Current.Cache["UserGroup_1_Permissions"] == null)
{
_Permissions = DAL.getPermissions("UserGroup1") as List<Permissions>;
System.Web.HttpContext.Current.Cache["UserGroup_1_Permissions"] = _Permissions;
}
else
{
_Permissions = System.Web.HttpContext.Current.Cache["UserGroup_1_Permissions"] as List<Permissions>;
}
This way, you would retrieve them from DB only first time, as it will get stored in HttpContext.Current.Cache.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.