Adds a constant id for the member distributed cache object,

adds extension method to DistrubutedCache to refresh the member cache,
Changes all distrubuted cache calls for members to use extension method.
This commit is contained in:
Shannon Deminick
2013-02-07 03:58:47 +06:00
parent b6ec42334b
commit a1c2352dca
3 changed files with 13 additions and 4 deletions

View File

@@ -53,6 +53,16 @@ namespace Umbraco.Web.Cache
{
dc.Remove(new Guid(DistributedCache.PageCacheRefresherId), pageId);
}
/// <summary>
/// Refreshes the cache amongst servers for a member
/// </summary>
/// <param name="dc"></param>
/// <param name="memberId"></param>
public static void RefreshMemberCache(this DistributedCache dc, int memberId)
{
dc.Refresh(new Guid(DistributedCache.MemberCacheRefresherId), memberId);
}
}
/// <summary>
@@ -75,6 +85,7 @@ namespace Umbraco.Web.Cache
public const string TemplateRefresherId = "DD12B6A0-14B9-46e8-8800-C154F74047C8";
public const string PageCacheRefresherId = "27AB3022-3DFA-47b6-9119-5945BC88FD66";
public const string MemberCacheRefresherId = "E285DF34-ACDC-4226-AE32-C0CB5CF388DA";
#endregion