Fixed caching issues on editing node permissions
This commit is contained in:
@@ -2,9 +2,7 @@
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.Models.Membership;
|
||||
|
||||
using Umbraco.Core.Persistence.Repositories;
|
||||
using umbraco.interfaces;
|
||||
|
||||
namespace Umbraco.Web.Cache
|
||||
{
|
||||
@@ -31,8 +29,6 @@ namespace Umbraco.Web.Cache
|
||||
public override void RefreshAll()
|
||||
{
|
||||
ClearAllIsolatedCacheByEntityType<IUser>();
|
||||
if (UserPermissionsCache)
|
||||
UserPermissionsCache.Result.ClearCacheByKeySearch(CacheKeys.UserPermissionsCacheKey);
|
||||
base.RefreshAll();
|
||||
}
|
||||
|
||||
@@ -47,17 +43,8 @@ namespace Umbraco.Web.Cache
|
||||
var userCache = ApplicationContext.Current.ApplicationCache.IsolatedRuntimeCache.GetCache<IUser>();
|
||||
if (userCache)
|
||||
userCache.Result.ClearCacheItem(RepositoryBase.GetCacheIdKey<IUser>(id));
|
||||
|
||||
if (UserPermissionsCache)
|
||||
UserPermissionsCache.Result.ClearCacheByKeySearch(string.Format("{0}{1}", CacheKeys.UserPermissionsCacheKey, id));
|
||||
|
||||
|
||||
base.Remove(id);
|
||||
}
|
||||
|
||||
private Attempt<IRuntimeCacheProvider> UserPermissionsCache
|
||||
{
|
||||
get { return ApplicationContext.Current.ApplicationCache.IsolatedRuntimeCache.GetCache<EntityPermission>(); }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@ namespace Umbraco.Web.Cache
|
||||
|
||||
private Attempt<IRuntimeCacheProvider> UserGroupPermissionsCache
|
||||
{
|
||||
get { return ApplicationContext.Current.ApplicationCache.IsolatedRuntimeCache.GetCache<UserGroupEntityPermission>(); }
|
||||
get { return ApplicationContext.Current.ApplicationCache.IsolatedRuntimeCache.GetCache<EntityPermission>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ namespace Umbraco.Web.Cache
|
||||
|
||||
private Attempt<IRuntimeCacheProvider> UserGroupPermissionsCache
|
||||
{
|
||||
get { return ApplicationContext.Current.ApplicationCache.IsolatedRuntimeCache.GetCache<UserGroupEntityPermission>(); }
|
||||
get { return ApplicationContext.Current.ApplicationCache.IsolatedRuntimeCache.GetCache<EntityPermission>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user