Fixes: U4-3937 Ensure media is indexed across all servers in LB environment with Distributed Cache calls

This fix is for media indexes to be distributed properly and for unpublished content to be distributed properly, now to get members to do the same.
This commit is contained in:
Shannon
2014-03-06 17:50:08 +11:00
parent 4adc2562b1
commit d0cc93d6a2
9 changed files with 404 additions and 136 deletions

View File

@@ -25,6 +25,20 @@ namespace Umbraco.Core.Models
{
#region IContent
/// <summary>
/// Returns true if this entity was just published as part of a recent save operation (i.e. it wasn't previously published)
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
/// <remarks>
/// This is helpful for determining if the published event will execute during the saved event for a content item.
/// </remarks>
internal static bool JustPublished(this IContent entity)
{
var dirty = (IRememberBeingDirty)entity;
return dirty.WasPropertyDirty("Published") && entity.Published;
}
/// <summary>
/// Determines if a new version should be created
/// </summary>