移除不用的缓存数据Key

This commit is contained in:
Argo-Lenovo 2016-12-31 16:49:25 +08:00
parent 93fa750173
commit 815fb08c5c
2 changed files with 2 additions and 4 deletions

View File

@ -42,7 +42,7 @@ namespace Bootstrap.DataAccess
});
cacheKeys.Add(UserHelper.RetrieveNewUsersDataKey);
// final cleanup
CacheManager.Clear(key => cacheKeys.Any(k => k == key) || key.Contains(UserHelper.RetrieveUsersDataKey) || key.Contains(RoleHelper.RetrieveRolesByUserNameDataKey));
CacheManager.Clear(key => cacheKeys.Any(k => k == key) || key.Contains(UserHelper.RetrieveUsersDataKey));
cacheKeys.Clear();
}
if (groupIds != null)

View File

@ -1,5 +1,4 @@
using Longbow;
using Longbow.Caching;
using Longbow.Caching;
using Longbow.Caching.Configuration;
using Longbow.Data;
using Longbow.ExceptionManagement;
@ -17,7 +16,6 @@ namespace Bootstrap.DataAccess
/// </summary>
public static class RoleHelper
{
internal const string RetrieveRolesByUserNameDataKey = "RoleHelper-RetrieveRolesByUserName";
internal const string RetrieveRolesDataKey = "RoleHelper-RetrieveRoles";
internal const string RetrieveRolesByUserIDDataKey = "RoleHelper-RetrieveRolesByUserId";
internal const string RetrieveRolesByMenuIDDataKey = "RoleHelper-RetrieveRolesByMenuId";