Fixes: #U4-1986 - data type cache is not refreshed in load balanced environments.

This commit is contained in:
Shannon Deminick
2013-03-22 05:04:32 +06:00
parent 2a9309ea38
commit e8dd56786b
9 changed files with 116 additions and 46 deletions

View File

@@ -48,6 +48,29 @@ namespace Umbraco.Web.Cache
#endregion
#region Data type cache
/// <summary>
/// Refreshes the cache amongst servers for a template
/// </summary>
/// <param name="dc"></param>
/// <param name="dataTypeId"></param>
public static void RefreshDataTypeCache(this DistributedCache dc, int dataTypeId)
{
dc.Refresh(new Guid(DistributedCache.DataTypeCacheRefresherId), dataTypeId);
}
/// <summary>
/// Removes the cache amongst servers for a template
/// </summary>
/// <param name="dc"></param>
/// <param name="dataTypeId"></param>
public static void RemoveDataTypeCache(this DistributedCache dc, int dataTypeId)
{
dc.Remove(new Guid(DistributedCache.DataTypeCacheRefresherId), dataTypeId);
}
#endregion
#region Page cache
/// <summary>
/// Refreshes the cache amongst servers for all pages