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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user