missing checkin file

This commit is contained in:
Shannon Deminick
2013-03-21 20:30:32 +06:00
parent 52f05612ad
commit f5a1e41569

View File

@@ -16,6 +16,11 @@ using umbraco.interfaces;
namespace Umbraco.Web.Cache
{
//public class CacheUpdatedEventArgs : EventArgs
//{
//}
/// <summary>
/// DistributedCache is used to invalidate cache throughout the application which also takes in to account load balancing environments automatically
/// </summary>
@@ -42,6 +47,23 @@ namespace Umbraco.Web.Cache
private static readonly DistributedCache InstanceObject = new DistributedCache();
///// <summary>
///// Fired when any cache refresher method has fired
///// </summary>
///// <remarks>
///// This could be used by developers to know when a cache refresher has executed on the local server.
///// Similarly to the content.AfterUpdateDocumentCache which fires locally on each machine.
///// </remarks>
//public event EventHandler<CacheUpdatedEventArgs> CacheChanged;
//private void OnCacheChanged(CacheUpdatedEventArgs args)
//{
// if (CacheChanged != null)
// {
// CacheChanged(this, args);
// }
//}
/// <summary>
/// Constructor
/// </summary>
@@ -109,6 +131,20 @@ namespace Umbraco.Web.Cache
id);
}
/// <summary>
/// Sends a request to all registered load-balanced servers to refresh data based on the custom json payload
/// using the specified ICacheRefresher with the guid factoryGuid.
/// </summary>
/// <param name="factoryGuid"></param>
/// <param name="jsonPayload"></param>
public void RefreshByJson(Guid factoryGuid, string jsonPayload)
{
ServerMessengerResolver.Current.Messenger.PerformRefresh(
ServerRegistrarResolver.Current.Registrar.Registrations,
GetRefresherById(factoryGuid),
jsonPayload);
}
/// <summary>
/// Sends a request to all registered load-balanced servers to refresh all nodes
/// using the specified ICacheRefresher with the guid factoryGuid.
@@ -167,6 +203,20 @@ namespace Umbraco.Web.Cache
instances);
}
/// <summary>
/// Sends a request to all registered load-balanced servers to remove data based on the custom json payload
/// using the specified ICacheRefresher with the guid factoryGuid.
/// </summary>
/// <param name="factoryGuid"></param>
/// <param name="jsonPayload"></param>
public void RemoveByJson(Guid factoryGuid, string jsonPayload)
{
ServerMessengerResolver.Current.Messenger.PerformRemove(
ServerRegistrarResolver.Current.Registrar.Registrations,
GetRefresherById(factoryGuid),
jsonPayload);
}
private static ICacheRefresher GetRefresherById(Guid uniqueIdentifier)
{
return CacheRefreshersResolver.Current.GetById(uniqueIdentifier);