Removed erroneous cache flushing for tabs since there is no cache for tabs

This commit is contained in:
Shannon Deminick
2013-03-16 08:51:25 +06:00
parent 23bb0e3ac3
commit 7ef066f396
3 changed files with 4 additions and 13 deletions

View File

@@ -28,7 +28,5 @@ namespace Umbraco.Core.Cache
public const string PropertyTypeCacheKey = "UmbracoPropertyTypeCache";
//NOTE: I'm pretty sure we don't cache anything with this key anymore
internal const string PropertyTypeTabCacheKey = "Tab_PropertyTypes_Content:";
}
}

View File

@@ -70,10 +70,7 @@ namespace Umbraco.Web.Cache
foreach (var p in contentType.PropertyTypes)
{
ApplicationContext.Current.ApplicationCache.ClearCacheItem(CacheKeys.PropertyTypeCacheKey + p.Id);
}
//clears the cache for all tabs
var regexMatch = string.Format("{0}_{1}_{2}", CacheKeys.PropertyTypeTabCacheKey, @"\d+", contentType.Id);
ApplicationContext.Current.ApplicationCache.ClearCacheByKeyExpression(regexMatch);
}
//clears the cache associated with the content type properties collection
ApplicationContext.Current.ApplicationCache.ClearCacheItem(CacheKeys.ContentTypePropertiesCacheKey + contentType.Id);
//clears the dictionary object cache of the legacy ContentType

View File

@@ -1405,15 +1405,11 @@ namespace umbraco.cms.businesslogic
/// </summary>
/// <param name="id">The id.</param>
/// <param name="contentTypeId"></param>
[Obsolete("Cache for tabs is automatically refreshed by Umbraco when Property types are modified")]
[Obsolete("There is no cache to flush for tabs")]
public static void FlushCache(int id, int contentTypeId)
{
ApplicationContext.Current.ApplicationCache.ClearCacheItem(GenerateCacheKey(id, contentTypeId));
}
private static string GenerateCacheKey(int tabId, int contentTypeId)
{
return String.Format("{0}_{1}_{2}", CacheKeys.PropertyTypeTabCacheKey, tabId, contentTypeId);
//at some stage there was probably caching for tabs but this hasn't been in place for some time, so this method
//now does nothing.
}
/// <summary>