diff --git a/Bootstrap.Admin/appsettings.json b/Bootstrap.Admin/appsettings.json index 947b156e..11471809 100644 --- a/Bootstrap.Admin/appsettings.json +++ b/Bootstrap.Admin/appsettings.json @@ -78,6 +78,13 @@ } ], "CacheItems": [ + { + "Enabled": true, + "Key": "RoleHelper-RetrieveRolesByUserName", + "Interval": 600, + "SlidingExpiration": true, + "Desc": "指定用户角色数据缓存" + }, { "Enabled": true, "Key": "RoleHelper-RetrieveRolesByUrl", @@ -87,17 +94,10 @@ }, { "Enabled": true, - "Key": "GroupHelper-RetrieveGroupsByUserName", + "Key": "BootstrapUser-RetrieveUsersByName", "Interval": 600, "SlidingExpiration": true, - "Desc": "指定用户组数据缓存" - }, - { - "Enabled": true, - "Key": "RoleHelper-RetrieveRolesByUserName", - "Interval": 600, - "SlidingExpiration": true, - "Desc": "指定用户角色数据缓存" + "Desc": "登录用户数据" }, { "Enabled": true, @@ -113,6 +113,13 @@ "SlidingExpiration": true, "Desc": "用户所有菜单数据缓存" }, + { + "Enabled": true, + "Key": "GroupHelper-RetrieveGroupsByUserName", + "Interval": 600, + "SlidingExpiration": true, + "Desc": "指定用户组数据缓存" + }, { "Enabled": true, "Key": "UserHelper-RetrieveUsers", @@ -120,13 +127,6 @@ "SlidingExpiration": true, "Desc": "所有用户数据" }, - { - "Enabled": true, - "Key": "BootstrapUser-RetrieveUsersByName", - "Interval": 600, - "SlidingExpiration": true, - "Desc": "登录用户数据" - }, { "Enabled": true, "Key": "UserHelper-RetrieveUsersByRoleId", diff --git a/Bootstrap.Client.DataAccess/RoleHelper.cs b/Bootstrap.Client.DataAccess/RoleHelper.cs index 1284d0c2..6dedafe6 100644 --- a/Bootstrap.Client.DataAccess/RoleHelper.cs +++ b/Bootstrap.Client.DataAccess/RoleHelper.cs @@ -9,8 +9,8 @@ namespace Bootstrap.Client.DataAccess /// public static class RoleHelper { - public const string RetrieveRolesByUserNameDataKey = "BootstrapRole-RetrieveRolesByUserName"; - public const string RetrieveRolesByUrlDataKey = "BootstrapRole-RetrieveRolesByUrl"; + public const string RetrieveRolesByUserNameDataKey = "RoleHelper-RetrieveRolesByUserName"; + public const string RetrieveRolesByUrlDataKey = "RoleHelper-RetrieveRolesByUrl"; /// /// /// diff --git a/Bootstrap.Client/appsettings.json b/Bootstrap.Client/appsettings.json index d472b47e..17b473d5 100644 --- a/Bootstrap.Client/appsettings.json +++ b/Bootstrap.Client/appsettings.json @@ -35,6 +35,27 @@ } ], "CacheItems": [ + { + "Enabled": true, + "Key": "RoleHelper-RetrieveRolesByUserName", + "Interval": 600, + "SlidingExpiration": true, + "Desc": "指定用户角色数据缓存" + }, + { + "Enabled": true, + "Key": "RoleHelper-RetrieveRolesByUrl", + "Interval": 600, + "SlidingExpiration": true, + "Desc": "通过菜单获得角色数据" + }, + { + "Enabled": true, + "Key": "BootstrapUser-RetrieveUsersByName", + "Interval": 600, + "SlidingExpiration": true, + "Desc": "登录用户数据" + }, { "Enabled": true, "Key": "BootstrapDict-RetrieveDicts", @@ -48,27 +69,6 @@ "Interval": 600, "SlidingExpiration": true, "Desc": "用户所有菜单数据缓存" - }, - { - "Enabled": true, - "Key": "BootstrapRole-RetrieveRolesByUserName", - "Interval": 600, - "SlidingExpiration": true, - "Desc": "指定用户角色数据缓存" - }, - { - "Enabled": true, - "Key": "BootstrapRole-RetrieveRolesByUrl", - "Interval": 600, - "SlidingExpiration": true, - "Desc": "通过菜单获得所有角色数据" - }, - { - "Enabled": true, - "Key": "BootstrapUser-RetrieveUsersByName", - "Interval": 600, - "SlidingExpiration": true, - "Desc": "登录用户数据" } ] }