修改BUG:对新建角色、组、部门授权后由于缓存问题导致无法使用
This commit is contained in:
parent
37cf2565d8
commit
7af6ab8c40
|
@ -9,6 +9,7 @@ namespace Bootstrap.DataAccess
|
||||||
{
|
{
|
||||||
internal static class CacheCleanUtility
|
internal static class CacheCleanUtility
|
||||||
{
|
{
|
||||||
|
private const string BootstrapAdminPrincipalDataKey = "BootstrapAdminPrincipal-*";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -29,9 +30,11 @@ namespace Bootstrap.DataAccess
|
||||||
{
|
{
|
||||||
cacheKeys.Add(string.Format("{0}-{1}", UserHelper.RetrieveUsersByRoleIdDataKey, id));
|
cacheKeys.Add(string.Format("{0}-{1}", UserHelper.RetrieveUsersByRoleIdDataKey, id));
|
||||||
cacheKeys.Add(string.Format("{0}-{1}", GroupHelper.RetrieveGroupsByRoleIdDataKey, id));
|
cacheKeys.Add(string.Format("{0}-{1}", GroupHelper.RetrieveGroupsByRoleIdDataKey, id));
|
||||||
|
cacheKeys.Add(string.Format("{0}-{1}", MenuHelper.RetrieveMenusByRoleIdDataKey, id));
|
||||||
});
|
});
|
||||||
cacheKeys.Add(RoleHelper.RetrieveRolesDataKey + "*");
|
cacheKeys.Add(RoleHelper.RetrieveRolesDataKey + "*");
|
||||||
cacheKeys.Add(BootstrapMenu.RetrieveMenusDataKey + "*");
|
cacheKeys.Add(BootstrapMenu.RetrieveMenusDataKey + "*");
|
||||||
|
cacheKeys.Add(BootstrapAdminPrincipalDataKey);
|
||||||
}
|
}
|
||||||
if (userIds != null)
|
if (userIds != null)
|
||||||
{
|
{
|
||||||
|
@ -53,6 +56,7 @@ namespace Bootstrap.DataAccess
|
||||||
});
|
});
|
||||||
cacheKeys.Add(GroupHelper.RetrieveGroupsDataKey + "*");
|
cacheKeys.Add(GroupHelper.RetrieveGroupsDataKey + "*");
|
||||||
cacheKeys.Add(BootstrapMenu.RetrieveMenusDataKey + "*");
|
cacheKeys.Add(BootstrapMenu.RetrieveMenusDataKey + "*");
|
||||||
|
cacheKeys.Add(BootstrapAdminPrincipalDataKey);
|
||||||
}
|
}
|
||||||
if (menuIds != null)
|
if (menuIds != null)
|
||||||
{
|
{
|
||||||
|
@ -60,6 +64,7 @@ namespace Bootstrap.DataAccess
|
||||||
{
|
{
|
||||||
cacheKeys.Add(string.Format("{0}-{1}", RoleHelper.RetrieveRolesByMenuIdDataKey, id));
|
cacheKeys.Add(string.Format("{0}-{1}", RoleHelper.RetrieveRolesByMenuIdDataKey, id));
|
||||||
});
|
});
|
||||||
|
cacheKeys.Add(MenuHelper.RetrieveMenusByRoleIdDataKey + "*");
|
||||||
cacheKeys.Add(BootstrapMenu.RetrieveMenusDataKey + "*");
|
cacheKeys.Add(BootstrapMenu.RetrieveMenusDataKey + "*");
|
||||||
}
|
}
|
||||||
if (dictIds != null)
|
if (dictIds != null)
|
||||||
|
|
|
@ -16,7 +16,10 @@ namespace Bootstrap.DataAccess
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class MenuHelper
|
public static class MenuHelper
|
||||||
{
|
{
|
||||||
private const string RetrieveMenusByRoleIdDataKey = "MenuHelper-RetrieveMenusByRoleId";
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
internal const string RetrieveMenusByRoleIdDataKey = "MenuHelper-RetrieveMenusByRoleId";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 删除菜单信息
|
/// 删除菜单信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue