Streamlines how Media cache gets invalidated - ensures Save() is called on media where it was needed,

cache now gets invalidated on events.
This commit is contained in:
Shannon Deminick
2013-02-07 05:53:59 +06:00
parent d93ca26181
commit c0b708b1f4
10 changed files with 104 additions and 94 deletions

View File

@@ -66,6 +66,16 @@ namespace Umbraco.Web.Cache
dc.Refresh(new Guid(DistributedCache.MemberCacheRefresherId), memberId);
}
/// <summary>
/// Removes the cache amongst servers for a member
/// </summary>
/// <param name="dc"></param>
/// <param name="memberId"></param>
public static void RemoveMemberCache(this DistributedCache dc, int memberId)
{
dc.Remove(new Guid(DistributedCache.MemberCacheRefresherId), memberId);
}
/// <summary>
/// Refreshes the cache amongst servers for a media item
/// </summary>
@@ -76,6 +86,16 @@ namespace Umbraco.Web.Cache
dc.Refresh(new Guid(DistributedCache.MediaCacheRefresherId), mediaId);
}
/// <summary>
/// Removes the cache amongst servers for a media item
/// </summary>
/// <param name="dc"></param>
/// <param name="mediaId"></param>
public static void RemoveMediaCache(this DistributedCache dc, int mediaId)
{
dc.Remove(new Guid(DistributedCache.MediaCacheRefresherId), mediaId);
}
/// <summary>
/// Refreshes the cache amongst servers for a macro item
/// </summary>