Fixes: #U4-2161 - permissions inheritance. Fixes up how user permissions cache is invalidated and looked up (it is now lazy and not forced). User permissions are also cached as a low priority for now and only for 20 mins based on #U4-2474.
This commit is contained in:
@@ -61,6 +61,23 @@ namespace Umbraco.Web.Cache
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region User permissions cache
|
||||
public static void RemoveUserPermissionsCache(this DistributedCache dc, int userId)
|
||||
{
|
||||
dc.Remove(new Guid(DistributedCache.UserPermissionsCacheRefresherId), userId);
|
||||
}
|
||||
|
||||
public static void RefreshUserPermissionsCache(this DistributedCache dc, int userId)
|
||||
{
|
||||
dc.Refresh(new Guid(DistributedCache.UserPermissionsCacheRefresherId), userId);
|
||||
}
|
||||
|
||||
public static void RefreshAllUserPermissionsCache(this DistributedCache dc)
|
||||
{
|
||||
dc.RefreshAll(new Guid(DistributedCache.UserPermissionsCacheRefresherId));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Template cache
|
||||
/// <summary>
|
||||
/// Refreshes the cache amongst servers for a template
|
||||
|
||||
Reference in New Issue
Block a user