public static bool GetIsAdminFromCache()
{
bool keyVal = false;
if (SiteData.IsWebView && IsAuthenticated) {
string key = String.Format("{0}_{1}", keyIsAdmin, SecurityData.CurrentUserIdentityName);
if (HttpContext.Current.Cache[key] != null) {
keyVal = Convert.ToBoolean(HttpContext.Current.Cache[key]);
} else {
keyVal = IsUserInRole(SecurityData.CMSGroup_Admins);
HttpContext.Current.Cache.Insert(key, keyVal.ToString(), null, DateTime.Now.AddSeconds(30), Cache.NoSlidingExpiration);
}
}
return keyVal;
}